PDA

View Full Version : start animation only whit play button


Ashakuras
03-14-2011, 05:44 PM
I'm desperate I am studying flash and use the cs5, I have a task, is to add play and stop buttons, has already done this but now my question is this.

What actions need to keep the animation should not start until you press the play button?

thank you very much for your time and attention

Fayence
03-16-2011, 11:37 AM
myButton.addEventListener(MouseEvent.CLICK, myFunction);
function myFunction(event:MouseEvent)
{
instructions
}

Instructions would in your case be:

yourAnimation.start();

or, if your animation started on frame 10, say:

gotoAndPlay(10);