Navigating Movie Clip Timelines
Loop body Back To The First Frame
We've seen gotoAndPlay, now we'll use the gotoAndStop(); method to send body back to the frame 1. In future lessons, we'll use a conditional statement (if statement) to keep all of our code on the main timeline. In the interest of keeping this lesson a bit easier to understand, we'll drop theon the last frame of the body_mc Movie Clip.
- Double-Click to Edit in Place deeper and deepr, until you're editing body_mc
- Add an actions layer
- Insert a Keyframe on the frame after the last drawing
- Type the gotoAndStop(1); method in Actions window
That will do it! Clicking the button once sends body to frame 2. Clicknig the button a second time sends body to frame 3. Actions on frame 3 send body to frame 1: