User Guide

174 Creating Components
6. Enter LogIn in the AS 2.0 Class text box. This value is the component class name.
If you put the class in a package, enter the entire package name. For example,
mx.controls.CheckBox denotes the CheckBox class in the mx.controls package.
7. Click OK.
Flash opens in symbol-editing mode.
8. Insert a new layer. Name the top layer Actions and the bottom layer Assets.
9. Select Frame 2 in the Assets layer and insert a keyframe (F6).
This is the structure of the component movie clip: an Actions layer and an Assets layer.
The Actions layer has 1 keyframe and the Assets layer has 2 keyframes.
10. Select Frame 1 in the Actions layer and open the Actions panel (F9). Enter a stop()
global function.
This prevents the movie clip from proceeding to Frame 2.
11. Select File > Import > Open External Library and select the StandardComponents.fla file
from the Configuration/ComponentFLA folder.
In Windows: \Program Files\Macromedia\Flash
8\language\Configuration\ComponentFLA\StandardComponents.fla.
On the Macintosh: HD/Applications/Macromedia Flash 8/Configuration/
ComponentFLA/StandardComponents.fla
12. Select Frame 2 in the Assets layer. From within the StandardComponents.fla library,
browse to the Flash UI Components 2 folder. Drag a Button, Label and TextInput
component symbol to Frame 2 of the Assets layer.
Asset dependencies for these components are automatically copied to your LogIn.fla
library.
All the component assets are added to Frame 2 of the Assets layer. Because there is a
stop() global function on Frame 1 of the Actions layer, the assets in Frame 2 will not be
seen as they are arranged on the Stage.
You add assets to Frame 2 for two reasons:
NOTE
For information about folder locations, see “Configuration folders installed with
Flash” in Using Flash.