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

Chapter 14. Movie Clip Subclasses and Components > Making Movie Clip Components

14.5. Making Movie Clip Components

So far, we've ignored the possibility that an instance of our ballSymbol may be dragged to the Stage manually in the Flash authoring environment. If that happens, the Ball( ) constructor executes at runtime, even for instances dragged to the Stage during authoring (assuming that Ball has been defined as a subclass before the instance is placed on the timeline). But there's no opportunity to set parameters via an initObject—as with attachMovie( ) or duplicateMovieClip( )—when the instance is created manually during authoring. To overcome this problem, we must define our movie clip symbol as a component.

A component is simply a movie clip symbol that provides a GUI for setting properties in author-time instances. Typically, components are also MovieClip subclasses that use the author-time properties as constructor parameters.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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