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

Chapter 10. Events and Event Handling > Copying Movie Clip Event Handlers

10.12. Copying Movie Clip Event Handlers

Here's a quick point that has important ramifications: onClipEvent( ) and on( ) handlers are duplicated when a movie clip is duplicated via the duplicateMovieClip( ) function. However, event handler properties, such as onEnterFrame( ), are not! Suppose, for example, we have a movie clip on stage named square, which has an onClipEvent(load) handler defined:

onClipEvent (load) {
  trace("movie loaded");
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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