So I’m sure this is very simple, but I’m teaching myself flash and I’ve run into a problem.
I have a toggle button that is a simple movie clip on the stage. It needs to be a simple pause/resume play button for the music I have playing when the page loads. This is the code I’m using to start playing the music and for the button itself, but how do I make it control the sound?
//MUSIC CODE\\
var mySound:MUSICloop = new MUSICloop();
mySound.play(0,999);
//TOGGLE CODE\\
togglebutton.addEventListener(MouseEvent.CLICK, doToggle);
function doToggle(myevent:MouseEvent):void {
togglebutton.play();
}