Sound Button If/Else statement

Hey All!

I’m having a problem with a stop/play button. Basically as the site opens, sound starts playing; but should the user decide to stop the sound, I’ve made a button for that.
But I want the same button to be able to start the music again, if it is stopped.
(It’s basically a movieclip-button, with some animation.)
So, I actually want the same button to perform two separate commands.

So I was thinking in terms of an if/else statement. But I don’t know how to set it up.
Any help would be appreciated.

Here’s my code:

*stop();

mySound = new Sound();
mySound.loadSound(“Loop1.mp3”, true);
mySound.onSoundComplete = function() {
mySound.start(0, 999);
}
if (mySound.loadSound(“Loop1.mp3”, true)) {
this.Sound_btn.onRelease = function() {
mySound.stop();
Sound_btn.gotoAndPlay("_stop");
} } else {
this.Sound_btn.onRelease = function() {
mySound.start(0, 999);
Sound_btn.gotoAndPlay("_play");
}
}

*But, as you might’ve figured out, the “if statement” doesn’t work, so it skips right to “Else” *gotoAndPlay("_play"); *And starts the sound from the beginning.

What I’m basically looking for, is an if statement that tells Flash if the music is playing or not. I thought it could be accomplished by using the loadSound/isStreaming statement in the if variable, but obviously that would also cause problems if the sound had already been loaded.

I’ve searched this forum for posts with the same issue, but I couldn’t find any answers to this question.

I hope someone can help me out.

Thank you.

Stig