Creating A Component Movie Clip - MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Creating a component movie clip

To create a component, you must create a movie clip symbol and link it to the component's
class file.
The movie clip has two frames and two layers. The first layer is an Actions layer and has a
action on Frame 1. The second layer is an Assets layer with two keyframes. Frame 1 contains a
bounding box or any graphics that serve as placeholders for the final art. Frame 2 contains all
other assets, including graphics and base classes, used by the component.
Inserting a new movie clip symbol
All components are MovieClip objects. To create a new component, you must first insert a new
symbol into a new FLA 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.
Enter a symbol name. Name the component by capitalizing the first letter of each word in the
3.
component (for example, MyComponent).
Select the Movie Clip behavior.
4.
Click the Advanced button.
5.
The advanced settings appear in the dialog box.
Select Export for ActionScript.
6.
Enter a linkage identifier.
7.
In the AS 2.0 Class text box, enter the fully qualified path to the ActionScript 2.0 class.
8.
The class name should be the same as the component name that appears in the Components
panel. For example, the Button component's class is mx.controls.Button.
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.
If the ActionScript file is in a package, you must include the package name. This field's value
can be relative to the classpath or can be an absolute package path (for example,
mypackage.MyComponent).
In most cases, you should deselect Export in First Frame (it is selected by default). For more
9.
information, see
Click OK.
10.
Flash adds the symbol to the library and switches to symbol-editing mode. In this mode, the
name of the symbol appears above the upper left corner of the Stage, and a cross hair indicates
the symbol's registration point.
"Component development checklist" on page
956.

Creating a component movie clip

stop()
927

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents