Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making a wav file play when button pressed

Status
Not open for further replies.

mattbold

Programmer
Oct 5, 2001
45
GB
hello,

sorry this is probably a really easy problem but i'm running severely out of time, and i don't have a whole lot of experience in director..!

basically i have a .wav sound and i'd like to be able to play it when a button is pressed, and stop when another is pressed...

if anyone could help me it would be absolutely superb!

cheers ,
matt
 
Play the sound when a button is pressed use this:

on mouseDown
puppetSound 2,"x.wav"
end
it plays the wave file "x.wav" in channel two.

Stop the sound when another button is pressed use this script:

on mouseDown
puppetSound 2, 0
end

ends the sound in channel 2.

hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top