• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

4. Interactivity and Movie Clips > 4.2. Controlling the Character With Actionsc...

Controlling the Character With Actionscript

As we saw in Chapter 3, we need to add a stop() action to the main timeline to prevent the animation from looping. (The words action and command are often used interchangeably; both refer to an instruction programmers write in ActionScript to tell Flash what to do.) In addition, we need to tell the legs to stop moving when the character is standing still. To do this:

  1. Close the Preview window and return to Scene 1 (using the Edit bar).

  2. Add a new layer to the main timeline and name it actions. Remember, it’s good practice to keep all ActionScript on its own layer so it’s easy to find.

  3. Add a keyframe to frame 60 on the actions layer.

  4. Open the Actions panel (Window Development Panels Actions or F9).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint