User Guide
Table Of Contents
- Contents
- Working with Flash MX 2004
- Creating Basic Components in Flash MX 2004
- Creating Advanced Components in Flash MX 2004
- Contents
- About Creating components
- Writing the component’s ActionScript code
- Simple example of a class file
- General process for writing a class file
- Selecting a parent class
- Identifying the class, symbol, and owner names
- About the component instantiation life cycle
- Writing the constructor
- Specifying clip parameters
- Implementing the constructObject2() method
- Implementing the init() method
- Implementing the createChildren() method
- Implementing the commitProperties() method
- Implementing the measure() method
- Implementing the layoutChildren() method
- Implementing the draw() method
- Defining getters and setters
- Component metadata
- Defining component parameters
- Handling events
- Using the Event metadata
- About invalidation
- Skinning custom controls
- Adding styles
- Making components accessible
- Improving component usability
- Best practices when designing a component
- Using the ModalText example
- Troubleshooting
- Index

Working with component symbols 13
Editing symbols
Each symbol has its own Timeline. You can add frames, keyframes, and layers to a symbol’s
Timeline, just as you can to the main Timeline. On these layers and in these frames you store the
graphical assets for the symbol.
To edit the symbol’s linkage information:
• Right-click the symbol in the Flash Library, and select Linkage.
When creating components, you often start with a single symbol. Flash provides the following
ways for you to edit symbols:
• Edit the symbol in the context of the other objects on the Stage by selecting the Edit in Place
command. Other objects are dimmed to distinguish them from the symbol that you are
editing. The name of the symbol you are editing appears in an edit bar at the top of the Stage,
to the right of the current scene name.
• Edit the symbol in a separate window by selecting the Edit in New Window command.
Editing a symbol in a separate window lets you see the symbol and the main Timeline at the
same time. The name of the symbol that you are editing appears in the edit bar at the top of
the Stage.
• Edit the symbol by changing the window from the Stage view to a view of only the symbol,
using Edit Symbols mode. To enter Edit Symbols mode, select the symbol’s instance from the
Edit Symbols drop-down icon. The name of the symbol that you are editing appears in the edit
bar at the top of the Stage, to the right of the current scene name:
Editing symbol layers
After you add a new symbol and define the linkages for it, you can define the component’s assets
in the symbol’s Timeline.
A component’s symbol should have two layers. The first layer is the main layer, in which you
invoke the
stop() action so that the player does not play the entire movie that the component
comprises. The second layer contains all the skins and graphical symbols used by the component.
This section describes what layers to insert and what to add to those layers.