-
How to Restart MovieClip with stop in a Main Timeline Looping Animation?
Hi AS3 Guys,
I need help with my flash work regarding the looping animation.
-----------------------------------------------------------------------
Problem Case: I have Main Timeline which is a looping animation, within the Main Timeline there is movieclip named "MC" ( inside the movieclip timeline, I put stop(); so that the movieclip will not play automatically within the main timeline and wait for the animation to be finished ), but the problem is when the 2nd iteration of animation, the movie clip stops and doesnt restart its animation.
Note:
The total length of animation is 11secs @ 18FPS with a total of 199Frames
The movieclip is a only part of the main animation that had own animation itself.
I need AS3 code.
Question: How do I restart the movieclip animation in every iteration/loop of the main timeline animation. What am I going to do?
-----------------------------------------------------------------------
I tried some sample on the internet but no one works for me. Any answer would be great help. Thanks!
-
Use the gotoAndPlay() method. This will play the movie clip on the next timeline iteration.
For example,
If you are currently using the play() method to start the movie clip's animation. The playhead will still be at the end of the movie clip's timeline when the animation finishes. Therefore the next timeline iteration the movie clip will not play. If you use the MC.gotoAndPlay(2) method it will restart the playhead from the second frame.
Last edited by ilike2; 06-20-2012 at 04:53 AM.
Reason: typo
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|