flash q
- Started
- Last post
- 4 Responses
- tonks
hello,
I have a voice over running across a timeline. Bearing in mind that it is split up on different key frames ..is there a way I can turn of all the sound on a click of a button? I just tried the stopAllSounds action but nothing happened? Its not in an mc but it needs to be on the main timeline. Anyideas?
Cheers.
- Timson0
setVolume(0);
?
- tonks0
tried that as well. I think the problem is Im not actually targeting anything ie a movieclip... I just want something that stops anything thats a sound. And if I switch it back on it would start again in the correct place along the timeline.
- UndoUndo0
you could try using ._currentframe
to get the frame of yr clip, stop the playhead, set the volume to 0. then gotoback to that frame when you want it to play and set the volume to 100 again
- alloyd0
Is it set to be a streaming or event sound? If its streaming, it will stop the current sound but when it gets to the next keyframe that has sound attached, it will start playing that sound. If you absolutely must use streaming sound, then maybe you can try using an enterframe function to continually check if the sound is on or off and set the volume accordingly. Then again, I'm sure you don't have to have that VO on keyframes but rather set it, start it, and stop it using code. This way, if you attach the sound to the main timeline, you can turn the volume off for all of them by simply calling this.setVolume(0); or you can attach each sound to a blank movieclip and then loop through an array of all of your movieclips to turn whatever ones you want on or off or whatever.