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.
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;
};