Well, it is pretty simple.
Create a movie clip symbol. Name it whatever.
Inside that movie clip symbol have 2 frames both with stop() actions.
Create the off button in frame 1, and the on button in frame 2.
Now go back to the main timeline where your movie clip symbol is (so you aren’t at the 2 frames anymore) Right click on the movie clip symbol and open the Actions window.
Now on your movie clip, since MX can use button handlers on movie clips, add these actions…
on (release) {
if (!trip) {
stopAllSounds();
this.gotoAndStop(2);
trip = true;
} else {
this.gotoAndStop(1);
trip = false;
}
}
Now with this method… you will have to re-enter your clip, and click on Frame 1, then drag an instance of your music from the library and drag it onto frame 1 and set the amount of loops in the properties panel for the frame (CTRL+F3 to open properties panel).
Or you can add the sound through AS, but this will make your sound file load BEFORE your preloader, and I don’t know the way around that, but it is a pain.
But that code for your button will still be the same, but you will need to add more actions to frame 1 of your movie clip symbol.
So Frame 1 of your movie clip symbol should look like this…
mySound = new Sound(this);
mySound.attachSound("music");
mySound.start(0, 99);
stop();
And to get it to work you will have to right click on your music file in the flash library (CTRL+L) and select “Linkage” and check the box for “Export for Actionscript” and give it the name “music” (no quotes).
I hope this helps 
Note: Oh yeah, the 99 in the mySound.start is the amount of times to loop, 99 is the max no matter what. The 0 is the offset, and it is the number of seconds into the sound it will actually start to play.