# "Mute All Sounds" script and Volume Bar

**URL:** <https://forum.kirupa.com/t/mute-all-sounds-script-and-volume-bar/183271>\
**Category:** flash\
**Created:** [March 25, 2006, 9:46am UTC](https://forum.kirupa.com/t/mute-all-sounds-script-and-volume-bar/183271 "2006-03-25T09:46:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![msmemsme](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@msmemsme](https://forum.kirupa.com/u/msmemsme)\
**Post date:** [March 25, 2006, 9:46am UTC](https://forum.kirupa.com/t/mute-all-sounds-script-and-volume-bar/183271/1 "2006-03-25T09:46:41Z")

</div>

[FONT=Comic Sans MS][COLOR=navy]Dear All,[/COLOR][/FONT]  
[FONT=Comic Sans MS][COLOR=navy]Thanks for this great forums and your great topics. I have a question, can u please help me getting the script that stops all running sounds in the flash movie?[/COLOR][/FONT]  
[FONT=Comic Sans MS][COLOR=navy]I want to make a button that when pressed all sounds will stop, and when pressed again all sounds play again.[/COLOR][/FONT]  
[FONT=Comic Sans MS][COLOR=navy]Also, I need to know how to make a volume bar to increase or decrease the sound volume. Can any one give me a simple way to do these 2 things?[/COLOR][/FONT]  
[FONT=Comic Sans MS][COLOR=navy]Thank you and waiting your significant replies![/COLOR][/FONT]  
[FONT=Comic Sans MS][COLOR=darkorange] **Mohammed** [/COLOR][/FONT]

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [March 25, 2006, 9:48am UTC](https://forum.kirupa.com/t/mute-all-sounds-script-and-volume-bar/183271/2 "2006-03-25T09:48:15Z")

</div>

Are you using sounds on the timeline or a Sound object?

---

<div class="post-metadata">

**Author:** ![Macaroni\_Ted](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Macaroni\_Ted](https://forum.kirupa.com/u/Macaroni_Ted)\
**Post date:** [March 25, 2006, 9:59am UTC](https://forum.kirupa.com/t/mute-all-sounds-script-and-volume-bar/183271/3 "2006-03-25T09:59:17Z")

</div>

\_root.globalSound = new Sound();

place on frame one of the \_root timeline, anything you do to that sound object will happen to all others, regardless of how they are defined, where they are defined or to which movie clip they are associated.

---

<div class="post-metadata">

**Author:** ![Macaroni\_Ted](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Macaroni\_Ted](https://forum.kirupa.com/u/Macaroni_Ted)\
**Post date:** [March 25, 2006, 10:03am UTC](https://forum.kirupa.com/t/mute-all-sounds-script-and-volume-bar/183271/4 "2006-03-25T10:03:13Z")

</div>

posted too quickly i ment to put

and then you should be able to use this

myVariable =false  
volControl\_btn.onRelease = function() {  
if (myVariable) {  
globalSound.setVolume(100);  
} else {  
globalSound.setVolume(0);  
}  
myVariable = !myVariable;  
};

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [March 25, 2006, 1:08pm UTC](https://forum.kirupa.com/t/mute-all-sounds-script-and-volume-bar/183271/5 "2006-03-25T13:08:22Z")

</div>

[http://kennybellew.com/tutorial/](http://kennybellew.com/tutorial/) 🙂

scotty(-:

---

<div class="post-metadata">

**Author:** ![Macaroni\_Ted](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Macaroni\_Ted](https://forum.kirupa.com/u/Macaroni_Ted)\
**Post date:** [March 25, 2006, 3:49pm UTC](https://forum.kirupa.com/t/mute-all-sounds-script-and-volume-bar/183271/6 "2006-03-25T15:49:42Z")

</div>

> [@scotty](#):
>
> [http://kennybellew.com/tutorial/](http://kennybellew.com/tutorial/) 🙂
> 
> scotty(-:

yep thats where i copied the first post’s text from :book:
