May 28, 2005 #1 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..
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..
Jun 1, 2005 1 #2 fjp476 Technical User Dec 28, 2001 113 US 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 Upvote 0 Downvote
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