MACROMEDIA FLEX - DEVELOPING COMPONENTS AND THEMES Manual page 15

Developing flex components and themes in flash authoring
Table of Contents

Advertisement

Adding dependent components
You can create new components based on existing Flex components, such as Button, CheckBox,
UIObject, and UIComponent. In many cases your new component combines the functionality
and symbols of existing visual Flex components. You must add the component symbols (or
compiled clips) of the components on which your new component depends to the component
FLA file's Library.
After you add symbols to the Library, Flash can include the assets in the SWC file when you
export your new component. For example, to create a custom text area component, you must first
add the TextArea component and its assets to the Library.
Also, when you build a compound component (a component that is built from multiple
components, such as a ComboBox), you must add each of the subcomponents to the Library.
If you add a dependent component that is not in Flash but is in the Flex architecture, you must
take special steps to produce a SWC file. For more information, see
utility" on page
19.
To add a dependent component to your component's Library:
Enter Edit Symbols mode for your component symbol.
1.
Select the second frame of the assets layer.
2.
Select the dependent component's symbol from the Flex Components drop-down list in the
3.
Components panel. If you do not have a list of Flex Components in your Components panel,
see
"Adding Flex classes and components to the Flash IDE" on page
Drag the component onto the Stage in the second frame of your new component's assets layer.
4.
Flash adds the component to the Library.
Converting symbols into components
After you add a symbol to your FLA file, add its assets, and link it to the ActionScript class file,
you must convert it to a component. You can inspect and edit a component with the Component
Definition panel, and you also can export it as a SWC file.
To tell the difference between a symbol and a component, look at the icon in the Library. The
following table shows the symbol icon and the default component icon:
Symbol
Each built-in Flash component has a distinct icon. For example, the Button control has its own
icon that looks like a button. You can add your own icon for your new component to the Flash
environment, or use one of the Flash component icons. The latter practice is not recommended,
because it might cause confusion. The default icon is adequate to indicate a generic component.
For more information, see
"Adding an icon" on page
"Using the SWCRepair
Component
71.
Working with component symbols
8.
15

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX - DEVELOPING COMPONENTS AND THEMES and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents