# MUTE & UNMUTE Buttons - Having Difficulties, please help

**URL:** https://forum.kirupa.com/t/mute-unmute-buttons-having-difficulties-please-help/64937
**Category:** Uncategorized
**Created:** [September 21, 2004, 4:24pm UTC](https://forum.kirupa.com/t/mute-unmute-buttons-having-difficulties-please-help/64937 "2004-09-21T16:24:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![teresam](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@teresam](https://forum.kirupa.com/u/teresam)
#### Post date: [September 21, 2004, 4:24pm UTC](https://forum.kirupa.com/t/mute-unmute-buttons-having-difficulties-please-help/64937/1 "2004-09-21T16:24:33Z")

</div>

Im having a hard time trying to get the mute and unmute(replay) buttons to work. THis is what i want. A mute button, which mutes the music. and a “replay” button, that when its clicked on, it will replay the movie AS WELL as allow the user to hear the music again.

bg = the name of my background music. PLEASE HELP. thank you.

* * *

on(release){  
currentVolume = bg.getVolume();  
bg.setVolume(0);

## }

And in the replay button here is the code, that im trying to set the volume back up at 100…

## on (release) { gotoAndPlay(2); bg.setVolume(100); }

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 21, 2004, 5:20pm UTC](https://forum.kirupa.com/t/mute-unmute-buttons-having-difficulties-please-help/64937/2 "2004-09-21T17:20:35Z")

</div>

as long as you defined your sound object

```auto

bg = new Sound();

```

```auto

on(release){
bg.setVolume(0);
}

```

will work 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 21, 2004, 5:44pm UTC](https://forum.kirupa.com/t/mute-unmute-buttons-having-difficulties-please-help/64937/3 "2004-09-21T17:44:19Z")

</div>

FINALLY!!! Thats worked perfectly.

Thank you so much.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 21, 2004, 5:50pm UTC](https://forum.kirupa.com/t/mute-unmute-buttons-having-difficulties-please-help/64937/4 "2004-09-21T17:50:40Z")

</div>

Your Welcome 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 21, 2004, 5:54pm UTC](https://forum.kirupa.com/t/mute-unmute-buttons-having-difficulties-please-help/64937/5 "2004-09-21T17:54:16Z")

</div>

I’m trying to do something similar but have the volume fade out/in when you click the button eventually muting the sound. What code would I need to add in order to do that?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 21, 2004, 7:58pm UTC](https://forum.kirupa.com/t/mute-unmute-buttons-having-difficulties-please-help/64937/6 "2004-09-21T19:58:43Z")

</div>

Anyone?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 21, 2004, 8:07pm UTC](https://forum.kirupa.com/t/mute-unmute-buttons-having-difficulties-please-help/64937/7 "2004-09-21T20:07:54Z")

</div>

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