# Set global volume to zero, please help!

**URL:** https://forum.kirupa.com/t/set-global-volume-to-zero-please-help/182309
**Category:** Uncategorized
**Created:** [March 17, 2006, 2:43am UTC](https://forum.kirupa.com/t/set-global-volume-to-zero-please-help/182309 "2006-03-17T02:43:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)
#### Post date: [March 17, 2006, 2:43am UTC](https://forum.kirupa.com/t/set-global-volume-to-zero-please-help/182309/1 "2006-03-17T02:43:57Z")

</div>

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](http://www.i-mambo.net/EAS/Main2.fla)

---

<div class="post-metadata">

### Author: ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)
#### Post date: [March 20, 2006, 4:25am UTC](https://forum.kirupa.com/t/set-global-volume-to-zero-please-help/182309/2 "2006-03-20T04:25:22Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![999](https://avatars.discourse-cdn.com/v4/letter/9/c5a1d2/32.png) [@999](https://forum.kirupa.com/u/999)
#### Post date: [March 20, 2006, 4:45am UTC](https://forum.kirupa.com/t/set-global-volume-to-zero-please-help/182309/3 "2006-03-20T04:45:39Z")

</div>

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.

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

```

---

<div class="post-metadata">

### Author: ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)
#### Post date: [March 20, 2006, 2:24pm UTC](https://forum.kirupa.com/t/set-global-volume-to-zero-please-help/182309/4 "2006-03-20T14:24:33Z")

</div>

wow! it works!.. awesome thanks guys!
