Working With Component Symbols - MACROMEDIA FLEX - DEVELOPING COMPONENTS AND THEMES Manual

Developing flex components and themes in flash authoring
Table of Contents

Advertisement

Working with component symbols

All components are MovieClip objects, which are a type of symbol. This section describes how to
create new symbols, edit existing symbols, and convert symbols to components.
Adding new symbols
To create a new component, you must insert a new symbol into a new FLA file. You then convert
the symbol to a component so that you can link the component to a class file.
To add a new component symbol:
In Flash, create a blank Flash document.
1.
Select Insert > New Symbol.
2.
The Create New Symbol dialog box appears.
In the Name field, enter the fully qualified symbol name. You should use package names and
3.
avoid simple names such as Button or List, to avoid naming conflicts with existing components.
The symbol name will be the component name, including the package (if any) that it resides
in. A good convention to use is to name the component by capitalizing the first letter of each
word in the component (for example, myPackage.MyComponent or MyComponent).
Select the Movie Clip option for the behavior.
4.
Note: A MovieClip object has its own multiframe Timeline that plays independently of the
main Timeline.
Click the Advanced button.
5.
The advanced settings appear in the dialog box.
In the Identifier field, enter a fully qualified linkage identifier (for example,
6.
myPackage.MyComponent).
The identifier is used as symbol name and linkage name, and as the associated class name. It
should be the same as the symbol name.
In the AS 2.0 Class field, enter the fully qualified path to the component's ActionScript 2.0 class
7.
file, relative to your classpath settings. If the ActionScript file is in a package, you must include
the package name (for example, myPackage.MyComponent).
Note: Do not include the filename's extension; the AS 2.0 Class text box points to the packaged
location of the class and not the file system's name for the file. This field's value should be the
same as the Identifier.
Select Export for ActionScript. This tells Flash to package the component by default with any
8.
Flash content that is used by the component.
Deselect Export in First Frame (it is selected by default).
9.
Click OK.
10.
Flash adds the new symbol to the Library and switches to Edit Symbols mode. In this mode,
the name of the symbol appears above the upper left corner of the Stage, and a cross-hair
pointer indicates the symbol's registration point.
You can edit the linkage identifier and ActionScript class for the new symbol by right-clicking
on the symbol in the Library and selecting Properties.
12
Chapter 1: Working with Flash MX 2004

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

This manual is also suitable for:

Flex

Table of Contents