About Creating Components - Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual

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

Advertisement

This example shows the following relationships among the components:
You define a main MXML file that contains the
In your main MXML file, you define an ActionScript block that uses the
tag. Inside the ActionScript block, you write ActionScript code, or include external logic
defined by an ActionScript file. Typically, you use this area to write small amounts of
ActionScript code. If you must write large amounts of ActionScript code, you should
include an external file.
The main MXML file uses MXML and ActionScript to reference components supplied
with Flex, and to reference your custom components.
Custom components can reference other custom components.
The Flex class hierarchy
Flex is implemented as an ActionScript class hierarchy. That class hierarchy contains
component classes, manager classes, data-service classes, and classes for all other Flex features.
The following example shows a portion of the class hierarchy for the Flex visual components,
such as controls and containers:
Container
Box
Form
VBox
For a complete description of the class hierarchy, see the Adobe Flex 2 Language
Reference.
All visual components are derived from the
components are also implemented as a class hierarchy in ActionScript. The most commonly
used nonvisual classes are the Validator, Formatter, and Effect base classes.
You create custom components by extending the Flex class hierarchy using the MXML and
ActionScript languages. Components inherit the properties, methods, events, styles, and
effects of their superclasses.
UIComponent
Button
NumericStepper
<mx:Application>
ComboBase
ComboBox
UIComponent
ActionScript class. Flex nonvisual

About creating components

tag.
<mx:Script>
15

Advertisement

Table of Contents
loading

Table of Contents