Attribute
collectionItem
identifier
For more information, see
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
Defining component parameters
When building a component, you can add parameters that define its appearance and behavior.
The most commonly used parameters appear as authoring parameters in the Component
inspector and Property inspector. You can also set all inspectable and collection parameters with
ActionScript. You define these properties in the component class file by using the Inspectable tag
(see
"About the Inspectable tag" on page
The following example sets several component parameters in the JellyBean class file, and exposes
them with the Inspectable tag in the Component inspector:
class JellyBean{
// a string parameter
[Inspectable(defaultValue="strawberry")]
public var flavorStr:String;
// a string list parameter
[Inspectable(enumeration="sour,sweet,juicy,rotten",defaultValue="sweet")]
public var flavorType:String;
// an array parameter
[Inspectable(name="Flavors", defaultValue="strawberry,grape,orange",
verbose=1, category="Fruits")]
var flavorList:Array;
// an object parameter
[Inspectable(defaultValue="belly:flop,jelly:drop")]
public var jellyObject:Object;
// a color parameter
[Inspectable(defaultValue="#ffffff")]
public var jellyColor:Color;
// a setter
Type
Description
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.
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
Values dialog box displays name0, name1, name2, and so on).
"Collection Properties" on page
959.
"Adding an icon" on page
937).
Creating the ActionScript class file
, the
identifier=name
956.
943
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?