AS3 for an animated button

Posted by Jenya on Stack Overflow See other posts from Stack Overflow or by Jenya
Published on 2010-03-18T21:21:05Z Indexed on 2010/03/18 21:31 UTC
Read the original article Hit count: 262

Filed under:

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

© Stack Overflow or respective owner

Related posts about actionscript-3