User Guide
Selecting a parent class 925
The following table briefly describes the version 2 base classes:
Understanding the UIObject class
Components based on version 2 of the Macromedia Component Architecture descend from the
UIObject class, which is a subclass of the MovieClip class. The MovieClip class is the base class
for all classes in Flash that represent visual objects on the screen.
UIObject adds methods that allow you to handle styles and events. It posts events to its listeners
just before drawing (the
draw event is the equivalent of the MovieClip.onEnterFrame event),
when loading and unloading (
load and unload), when its layout changes (move, resize), and
when it is hidden or revealed (
hide and reveal).
UIObject provides alternate read-only variables for determining the position and size of a
component (
width, height, x, y), and the move() and setSize() methods to alter the position
and size of an object.
The UIObject class implements the following:
• Styles
• Events
• Resize by scaling
Understanding the UIComponent class
The UIComponent class is a subclass of UIObject. It is the base class of all components that
handle user interaction (mouse and keyboard input). The UIComponent class allows
components to do the following:
• Receive focus and keyboard input
• Enable and disable components
• Resize by layout
Base class Extends Description
mx.core.UIObject
MovieClip UIObject is the base class for all graphical objects. It can have
shape, draw itself, and be invisible.
UIObject provides the following functionality:
• Editing styles
• Event handling
• Resizing by scaling
mx.core.UIComponent
UIObject UIComponent is the base class for all components.
UIComponent provides the following functionality:
• Creating focus navigation
• Creating a tabbing scheme
• Enabling and disabling components
• Resizing components
• Handling low-level mouse and keyboard events.