AS3 for an animated button
- by Jenya
I need help with AS3 for an animated button. The button (movie clip) I've created starts playing on a mouse-over but stops immediately when a mouse-out event occurs. But I want the button to finish the loop cycle before stopping the animation and play the animation on the next mouse-over from frame 1.
This is the code I have so far:
stop();
bt.addEventListener(MouseEvent.MOUSE_OVER,onMouseOver);
function onMouseOver(event:MouseEvent):void {
gotoAndPlay(1);
}
Thanks in advance,
Jenya