play(); the stopped MovieClip

If we have a MovieClip on the time-line,and we need it to start its animation in a specific time,what we should do ?

1- at the 1st key frame in the movie MovieClip we will add “stop();” ,that will make the MovieClip stopped at its 1st key-frame.

2- on the stage time-line,we will give the MovieClip an instance name,say “star_mc”.

3- when we want the MovieClip animation to start,just on the time-line call the MovieClip by its instance name and start the “play();” function :;

4- as we know,when the MovieClip end,it start again,that mean it will reach the 1st key-frame again,so it will find our code “stop();” and will stop.That mean the MovieClip will play only one time.

Tagged with: , , , , ,
Posted in Actionscript, Flash

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Follow AS3.0 for Flash Designers on
Follow me on Twitter
%d bloggers like this: