Understanding the UIObject class

Components based on version 2 of the Macromedia Component Architecture descend from the UIObject class, which wraps the MovieClip class. The MovieClip class is the base class for all classes in Flash that can draw on the screen. Many MovieClip properties and methods are related to the Timeline, which is an unfamiliar tool to developers who are new to Flash. The UIObject class was created to abstract many of those details. Subclasses of MovieClip do not document unnecessary MovieClip properties and methods. However, you can access these properties and methods if you want.

UIObject tries to hide the mouse handling and frame handling in MovieClip. It posts events to its listeners just before drawing (the equivalent of onEnterFrame), when loading and unloading, and when its layout changes (move, resize).

UIObject provides alternate read-only variables for determining the position and size of the movie clip. You can use the move() and setSize() methods to alter the position and size of an object.