How stop an animation and make it continue on button click.
Ok... I've been out of the loop with flash lately and I only know how to use action script 2 (and even that on a basic level). I'm more of an animator than a programmer.
So what I want to do is:
Create a simple animation that will start (i.e go to the second frame) when you push a button symbol that's been placed on the stage.
So I put this in to the first frame:
import flash.events.MouseEvent;
stop();
start_button.addEventListener (MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void
{
gotoAndPlay(2);
}
But the animation doesn't stop. It only stops when if I define the event directly to the stage (stage.addEventListener (MouseEvent.CLICK, on click);). But that allows you to click anywhere on the stage to make the animation play out. What am I doing wrong? Thank you for any answers in advance.
