Mp3 Player Problem =)

Hi all,

I’m learning to use actionscript 3.0 and its been rather difficult.

I managed to come up with a simple mp3 player and it works fine.

however when i press on play TWICE, it will overlap the same song, meaning it will play 2 similar songs simultaneously. how can i prevent that?

any help is greatly appreciated. thanks =)

[SIZE=1]// mp3 player

var audio:Sound = new Sound();
audio.load(new URLRequest(“song.mp3”));
var channel:SoundChannel = new SoundChannel();
channel = audio.play();

btn_play.buttonMode = true;
btn_play.addEventListener(MouseEvent.MOUSE_UP, function():void
{
channel = audio.play();
playerAnim.gotoAndPlay(1);
}
);

btn_stop.buttonMode = true;
btn_stop.addEventListener(MouseEvent.MOUSE_UP, function():void
{
channel.stop();
playerAnim.gotoAndStop(1);

}
);[/SIZE]