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

4. Interactivity and Movie Clips > 4.3. Controlling Movie Clips

Controlling Movie Clips

Movie clips can be assembled to create independent animations and controlled through ActionScript, as we saw in the last section, in which we used a stop() command to stop the animation of Box Guy and his legs. We can also allow the user to control the movie clips if we implement the necessary functionality and a user interface to control it. For example, we can tell Flash to restart the animation when the user clicks on the character. To accomplish this, we add an event handler to our ActionScript. An event handler tells the Flash Player, “When an event—such as the user clicking on the character—occurs, perform the following action(s).” In this case, the desired action is to replay the animation. How do we do this?


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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