MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 926

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Extending other version 2 classes
To make component construction easier, you can extend any class; you are not required to extend
the UIObject or UIComponent class directly. If you extend any other version 2 component's class
(except the Media components), you extend UIObject and UIComponent by default. Any
component class listed in the Component dictionary can be extended to create a new component
class.
For example, if you want to create a component that behaves almost the same as a Button
component does, you can extend the Button class instead of re-creating all the functionality of the
Button class from the base classes.
The following figure shows the version 2 component hierarchy:
Version 2 component hierarchy
This file is available in the Flash MX 2004\Samples\HelpExamples\images folder.
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 (FirstRun/classes/mx/core) to examine how they were built.
926
Chapter 7: Creating Components

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents