# Boolean first-timer making a mute button

**URL:** <https://forum.kirupa.com/t/boolean-first-timer-making-a-mute-button/213997>\
**Category:** Uncategorized\
**Created:** [January 24, 2007, 9:16pm UTC](https://forum.kirupa.com/t/boolean-first-timer-making-a-mute-button/213997 "2007-01-24T21:16:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lariat1997](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lariat1997](https://forum.kirupa.com/u/lariat1997)\
**Post date:** [January 24, 2007, 9:16pm UTC](https://forum.kirupa.com/t/boolean-first-timer-making-a-mute-button/213997/1 "2007-01-24T21:16:17Z")

</div>

Hey all,

Feel like an idiot here. I am trying to use the Boolean datatype for the first time. I have code that I want to mute sound. My function in my external movie works, but I cannot get the mute to convert to turn up the volume after I’ve set the volume to 0. Attached is my code:

```
 ActionScript Code:
 [FONT=Courier New][LEFT]mute_btn.[COLOR=#0000ff]onRelease[/COLOR] = [COLOR=#000000] **function** [/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR]

```

[COLOR=#000000]{[/COLOR]  
[COLOR=#000000] **var** [/COLOR] muter:[COLOR=#0000ff]Boolean[/COLOR];  
movieSound = empty\_mc.[COLOR=#000080]snd1[/COLOR].[COLOR=#0000ff]setVolume[/COLOR]COLOR=#000000[/COLOR]

```
[COLOR=#0000ff]if[/COLOR][COLOR=#000000]([/COLOR]muter == [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR]
[COLOR=#000000]{[/COLOR]
    movieSound = [COLOR=#000000] **true** [/COLOR];
    [COLOR=#0000ff]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]"true"[/COLOR][COLOR=#000000])[/COLOR];
    muter = [COLOR=#000000] **false** [/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#0000ff]else[/COLOR]
[COLOR=#000000]{[/COLOR]
    movieSound = [COLOR=#000000] **false** [/COLOR];
    [COLOR=#0000ff]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]"false"[/COLOR][COLOR=#000000])[/COLOR];
    muter = [COLOR=#000000] **true** [/COLOR];
[COLOR=#000000]}[/COLOR]

```

[COLOR=#000000]}[/COLOR]  
[/LEFT]  
[/FONT]  
The only trace I get is “false”. All I want is a simple mute button.

Thanks.
