This content has been marked as final. Show 2 replies
> What code do I need to use to start the music again after is is stopped?
> Any help with this is greatly appreciated.
You haven't mentioned how your audio is getting included (ActionScript?
embedded in a timeline?), but in any case, there are at least two approaches
that might work for you: a) toggling the overall volume of your SWF, rather
than stopping your sounds -- this means you can set the volume full blast
again later to "resume" the audio -- or b) using ActionScript to control the
starting and stopping of your sound. That fact that your code sample uses
on() tells me you're either using AS1 or AS2. Here are a few brief blogs on
Sound in ActionScript 2.0 that may help ...
Understanding the Sound Constructor (AS2)
How to Toggle Sound Globally (AS2)
How to Pause Sound and Resume Where it Left Off (AS2)
Those should get you started, but if you have questions, be sure to
reply and I'll work through it with you.
Co-author, Foundation Flash CS4 for Designers
"Luck is the residue of good design."
check the sound class. in particular, its start() and attachSound() methods. sample code is there if you find that helpful.