User Guide

Creating the ActionScript class file 153
About the InspectableList tag
Use the InspectableList tag to specify which subset of inspectable properties should appear in
the Property inspector. Use InspectableList in combination with Inspectable so that you can
hide inherited attributes for components that are subclasses. If you do not add an
InspectableList tag to your component’s class, all inspectable parameters, including those of
the component’s parent classes, appear in the Property inspector.
The InspectableList syntax is as follows:
[InspectableList("attribute1"[,...])]
// class definition
The InspectableList tag must immediately precede the class definition because it applies to the
entire class.
The following example allows the
flavorStr and colorStr properties to be displayed in the
Property inspector, but excludes other inspectable properties from the Parent class:
[InspectableList("flavorStr","colorStr")]
class BlackDot extends DotParent {
[Inspectable(defaultValue="strawberry")]
public var flavorStr:String;
[Inspectable(defaultValue="blue")]
public var colorStr:String;
...
}
About the Event tag
Use the Event tag to define events that the component emits.
This tag has the following syntax:
[Event("event_name")]
For example, the following code defines a click event:
[Event("click")]
Add the Event statements outside the class definition in the ActionScript file so that the
events are bound to the class and not a particular member of the class.
The following example shows the Event metadata for the UIObject class, which handles the
resize, move, and draw events:
...
import mx.events.UIEvent;
[Event("resize")]
[Event("move")]
[Event("draw")]
class mx.core.UIObject extends MovieClip {
...
}