im making a play pause button and i have hit a wall.
var snd:Sound = new Sound(new URLRequest("combination.mp3"));
btn_mc.addEventListener(MouseEvent.CLICK, playSound);
btn_mc.buttonMode =true;
function playSound(event:MouseEvent):void
{
snd.play();
btn_mc.removeEventListener(MouseEvent.CLICK, playSound);
btn_mc.addEventListener(MouseEvent.CLICK, stopSound);
}
function stopSound(event:MouseEvent):void
{
snd.stop();
btn_mc.addEventListener(MouseEvent.CLICK, playSound);
}
any ideas where im going wrong?