Toggle Button Music Control Help

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();
}

var pauseCheck:Boolean = false;
var position:int;

//MUSIC CODE\\

var mySound:MUSICloop = new MUSICloop();
var channel:SoundChannel = mySound.play(0,999);


//TOGGLE CODE\\

togglebutton.addEventListener(MouseEvent.CLICK, doToggle);
function doToggle(myevent:MouseEvent):void {
	if (pauseCheck == false) {
		position = channel.position;
		channel.stop();
		pauseCheck = true;
	} else {
		channel = mySound.play(position);
		pauseCheck = false;
	}
}

Thank you for your help. I tried that code and it’s exactly what I’m looking for except now it doesn’t toggle anymore. Any ideas?

Nevermind I’m stupid, I figured it out.