User Guide
138 Creating Components
The following figure shows the version 2 component hierarchy:
Version 2 component hierarchy
A FlashPaper version of this file is available in the Flash installation directory at this location:
Flash 8\Samples and Tutorials\Samples\Components\arch_diagram.swf.
About extending the MovieClip class
You can choose not to extend a version 2 class and have your component inherit directly from
the ActionScript MovieClip class. However, if you want any of the UIObject and
UIComponent functionality, you’ll have to build it yourself. You can open the UIObject and
UIComponent classes (First Run/Classes/mx/core) to examine how they are constructed.
Creating a component movie clip
To create a component, you must create a movie clip symbol and link it to the component’s
class file.
The movie clip has two frames and two layers. The first layer is an Actions layer and has a
stop() global function on Frame 1. The second layer is an Assets layer with two keyframes.
Frame 1 contains a bounding box or any graphics that serve as placeholders for the final art.
Frame 2 contains all other assets, including graphics and base classes, used by the component.