PDA

Click to See Complete Forum and Search --> : Turning Sound On and Off



hitmanllc
05-29-2001, 08:22 PM
Need simple input. I know how to turn sounds off, but how do I write a simple script for checking if sound is already on or off, then turning it on or off?

rockmeister
06-08-2001, 10:22 AM
There is an easier way to turn sound on and off. If you make a movieclip for your sound which you put in the main movie somewhere. Put nothing in it except three key frames, the first one has your sound loop or whatever and a 'stop' function, the second keyframe has just a 'stop' function, and the third key frame has a 'go to and stop frame 1 function'. Now in your main movie make a button that when you click it, it tells you sound movieclip to ' go to next frame'. At first the sound will be playing so when you click it goes to the frame without sound -sound off. If you click it again it goes to the next frame which goes to and stops on the first frame - sound plays again etc etc.

evanmcd
06-08-2001, 03:36 PM
the other thing is....if you need to stop a sound and resume it later while keeping pace with the movie (ie a voiceover or some such thing that needs to be synced with the animation), then you will need to use the Sound object in Flash 5. The manual lists how to do this step by step. very easy. let me know if you need the code and i'll dig it up.


-Evan