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.

  1. Double-Click to Edit in Place deeper and deepr, until you're editing body_mc
  2. Add an actions layer
  3. Insert a Keyframe on the frame after the last drawing
  4. Type the gotoAndStop(1); method in Actions window

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

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:

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player