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

Chapter 23. Animating with ActionScript > Using the onEnterFrame Event

Using the onEnterFrame Event

The onEnterFrame event is an event that Movie Clips respond to based on the frame rate of your document. The onEnterFrame event broadcasts continually to the movie clip instance that you specify an event handler for. If you tell a Movie Clip to respond to an onEnterFrame event, and your frame rate is 12 frames per second, the onEnterFrame event will broadcast approximately every twelfth of a second.

Because this event is continuously executing, it makes it ideal for animation. You can have a movie clip respond to the event by writing an event handler directly on the object, or in a keyframe on the timeline. The general syntax for both follows:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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