Set global volume to zero, please help!

i have a button, and i need to to see the volume to zero when this button is pressed, and when this button is pressed again, the volume goes back to 100

i have different pieces of audio all around my flash presentation so i just need a global volume that sets my volume to 0 and also to a 100 when pressing the button.

help please!.. here is my .fla

http://www.i-mambo.net/EAS/Main2.fla

I tried that and i didn’t work.

I have many pieces of audio in my flash presentation that i want to mute it with a button. and unmute it as well.

Anyone please help with this?

Teds code will work as long as none of your sounds volumes are being controlled by actionscript within their own movie clips. Actually I guess it still might work?

Either way just add a new sound object to Teds code on the main timeline (or wherever you button is) but dont actually have a sound associated with it. That should control your sounds globally.

var myVariable = false;
mySound_sound = new Sound();
volControl_btn.onRelease = function() {
    if (myVariable) {
        mySound_sound.setVolume(100);
    } else {
        mySound_sound.setVolume(0);
    }
    myVariable = !myVariable;
};

wow! it works!.. awesome thanks guys!