stop(); but.addEventListener(MouseEvent.CLICK, PlayF); function PlayF (e:MouseEvent): void { gotoAndPlay(Math.floor(Math.random()* 39)); }