# Button/mc NOT loop with animation?

**URL:** <https://forum.kirupa.com/t/button-mc-not-loop-with-animation/209961>\
**Category:** Uncategorized\
**Created:** [December 13, 2006, 5:57pm UTC](https://forum.kirupa.com/t/button-mc-not-loop-with-animation/209961 "2006-12-13T17:57:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![synergy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/synergy/32/3094_2.png) [@synergy](https://forum.kirupa.com/u/synergy)\
**Post date:** [December 13, 2006, 5:57pm UTC](https://forum.kirupa.com/t/button-mc-not-loop-with-animation/209961/1 "2006-12-13T17:57:41Z")

</div>

Hey all…I have made a sound toggle button using a variation of this [code](http://www.kirupa.com/forum/showpost.php?p=529584&postcount=6). When I used that code as specified it worked, but my MC/button wouldn’t play when given the instance **myMuteButton**. So I put the following code as _part_ of the MC/button:

```auto
on (release){
 gotoAndPlay(2)
}
on(release) {
    if(muted == false){
        myBackgroundSound.setVolume(0);
        muted = true;
    }else{
        myBackgroundSound.setVolume(100);
        muted = false;
    }
}

```

and vice versa for frame two.

Everything works great now except my toggle goes back to mute when the animations loops. Is there a way around this? I’m a noob at AS so please bear with me.

.fla is too big to attach. Click [here](http://www.bobgamingclan.net/images/bobanim.fla) to download it.

Thanks in advance
