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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling Volume in director 1

Status
Not open for further replies.

ricardi

Technical User
May 25, 2005
5
AU
hi there.

in my director file there is background music playing all the time....

i was wondering what the exact code would be if I had two buttons music on and music off.....

any help would be greatly appreciated..

 
For two buttons you could use something as simple as:

on mouseUp me
sound(1).play(member("yoursoundname"))
end

for the On button and a StopSound behaviour from the Library for the Off button. A better way would be to have one button to do both with this script:

on mouseUp me
case sound(1).status of
3:
sound(1).pause()

4:
sound(1).play()

end case

end mouseUp

*note Each of these examples assumes that your sound is playing in Sound Channell 1

I hope this helps.



Cheers~Frank
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top