![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Once you have created the new symbol and defined the linkages for it, you can define the component's assets in the symbol's Timeline.
A component's symbol should have two layers. This section describes what layers to insert and what to add to those layers.
For information on how to edit symbols, see Editing symbols.
This statement relies on the Flash MX 2004 classpath settings. (For more information, see Understanding the classpath.) The following example imports the MyComponent.as file that is in the package myPackage:
import myPackage.MyComponent;
Note: Use the import
statement and not the include
statement when importing an ActionScript class file. Do not surround the class name or package with quotation marks.
The Assets layer includes all the assets used by this component.
stop()
action in the Actions panel, as the following example shows:
stop();
Do not add any graphical assets to this frame. Flash Player will stop before the second frame, in which you can add the assets.
Any asset a component uses (whether it's another component or media such as bitmaps) should have an instance placed inside the component.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |