-
Mute sound across all loaded movieclips/layers/scenes
Situation: I have a project I'm working on where I have buttons which make click sounds on their own, and also take you to other scenes where a sound will immediately play. There are also three movieclips involved, total – my base movieclip and two independent ones that load on top of that.
Problem: I want to include a Mute button so that you can turn off all sounds, but can't figure out how to do that...
As I understand it, stopAllSounds won't work for me, because as soon as someone hits another button, a new sound will play.
Is there an easy way to do this? If not, what's the best way?
Thanks a lot!
-
Flash/Flex Developer
You don't need to worry about stopping the sounds, but rather muting the sounds. You can adjust the volumn from 100 (1) to 0. This will keep everyone quiet.
Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.
-
Is there code that would turn the volume for the whole project down to zero and back up again? Or could I create a variable that lists each individual effect, then turn that variable down to zero? And what if sounds exist across various swf files which load and unload on various button clicks?
And do I have to be using attachSound (or whatever) instead of just placing a sound in the timeline for that to work?
I'm not even sure that what I'm saying here makes sense... ugh. Wish I knew a bit more (ok, a LOT more) about programming. This is all pretty frustrating when it seems like it should be so easy.
What exactly have I gotten myself into here? :P
Last edited by decoyman; 01-20-2010 at 03:04 PM.
-
Flash/Flex Developer
Changing the volumn will affect ALL sounds within the Flash piece. If you want mute specific sounds while other can be heard, it is best to attach the sound using code. Doing so, giving each a proper instance name, will allow you to control their individual play/pause so the presentation runs smoothly.
Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.
-
Thanks, yes, affecting ALL sound is what I'm looking for. What would the code look like for that? I've tried going through the Flash help file, but it's not exactly the most, er, helpful thing unfortunately.
-
Flash/Flex Developer
Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|