Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 153

Creating and extending flex 2 components
Hide thumbs Also See for FLEX 2 - CREATING AND EXTENDING COMPONENTS:
Table of Contents

Advertisement

You can remove a component from a container by using the
are no references to the component, it is eventually deleted from memory by the garbage
collection mechanism of Adobe Flash Player 9.
About the steps for creating a component
When you implement a component, you override component methods, define new
properties, dispatch new events, or perform any other customizations required by your
application.
To implement your component, Follow these general steps:
If necessary, create any skins for the component.
1.
Create an ActionScript class file.
2.
Extend one of the base classes, such as UIComponent or another component class.
a.
Specify properties that the user can set by using an MXML tag property. For more
b.
information, see
on page
121.
Embed any graphic and skin files. For more information, see
c.
Simple Visual Components in ActionScript," on page
Implement the constructor.
d.
Implement the
e.
Implement the
f.
Implement the
g.
Implement the
h.
Implement the
i.
Add properties, methods, styles, events, and metadata.
j.
Deploy the component as an ActionScript file or as a SWC file.
3.
You do not have to override all component methods to define a new component. You only
override the methods required to implement the functionality of your component. If you
create a subclass of an existing component, such as Button control or VBox container, you
must implement the methods necessary for you to add any new functionality to the
component.
Chapter 9, "Creating Simple Visual Components in ActionScript,"
UIComponent.createChildren()
UIComponent.commitProperties()
UIComponent.measure()
UIComponent.layoutChrome()
UIComponent.updateDisplayList()
removeChild()
Chapter 9, "Creating
121.
method.
method.
method.
method.
method.
About creating advanced components
method. If there
153

Advertisement

Table of Contents
loading

Table of Contents