User Guide

158 Creating Components
The following table describes the attributes of the Collection tag:
For more information, see “Collection Properties” on page 187.
About the IconFile tag
You can add an icon that represents your component in the Components panel of the Flash
authoring environment. For more information, see Adding an icon” on page 185.
About the ComponentTask tag
You can specify one or more Flash JavaScript (JSFL) files to perform tasks for your
component from within the Flash authoring environment. Use the ComponentTask tag to
define this association between your component and its JSFL file and to associate any
additional files required a JSFL file. The JSFL files interact with the JavaScript API in the
Macromedia Flash authoring environment.
Attribute Type Description
name
String (Required) Name that appears in the Component inspector for the
collection.
variable
String (Required) ActionScript variable that points to the underlying
Collection object (for example, you might name a
Collection
parameter Columns, but the underlying
variable attribute might
be __columns).
collectionClass
String (Required) Specifies the class type to be instantiated for the
collection property. This is usually
mx.utils.CollectionImpl, but it
can also be a class that extends
mx.utils.CollectionImpl.
collectionItem
String (Required) Specifies the class of the collection items to be stored
within the collection. This class includes its own inspectable
properties that are exposed through metadata.
identifier
String (Required) Specifies the name of an inspectable property within
the collection item class that Flash MX uses as the default
identifier when the user adds a new collection item through the
Values dialog box. Each time a user creates a new collection item,
Flash MX sets the item name to identifier plus a unique index (for
example, if
identifier=name, the Values dialog box displays
name0, name1, name2, and so on).
NOTE
Any JSFL task files and required dependency files declared with the ComponentTask
tag must reside in the same folder as your component FLA file when you export your
component as a SWC file.