# Music loads.."Off" button works but "On" doesn't?

**URL:** https://forum.kirupa.com/t/music-loads-off-button-works-but-on-doesnt/197270
**Category:** Uncategorized
**Created:** [August 15, 2006, 2:12am UTC](https://forum.kirupa.com/t/music-loads-off-button-works-but-on-doesnt/197270 "2006-08-15T02:12:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![split67](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/split67/32/2089_2.png) [@split67](https://forum.kirupa.com/u/split67)
#### Post date: [August 15, 2006, 2:12am UTC](https://forum.kirupa.com/t/music-loads-off-button-works-but-on-doesnt/197270/1 "2006-08-15T02:12:04Z")

</div>

I’ve got the index page running fine. When opened the music loads the way it should. I created buttons to allow for “on” and “off” choices for the user. The “Off” button works fine, but if I click “on” nothing happens. Here’s the link to the page;

[http://www.shakeyhands.com/BunnyB/index.swf](http://www.shakeyhands.com/BunnyB/index.swf)

Here’s the actionscript i’m using. It’s on the sounds frame, not the buttons themselves.

bgSound = new Sound(this);  
bgSound.attachSound(“rebel”);  
musicon\_btn.enabled=false;

musicoff\_btn.onRelease = function() {  
bgSound.stop();  
musicon\_btn.enabled=true;  
musicoff\_btn.enabled=false;  
};  
musicon\_btn.onRelease = function() {  
bgSound.start();  
musicon\_btn.enabled=false;  
musicoff\_btn.enabled=true;  
};
