The InspectableList tag must immediately precede the class definition because it applies to the
entire class.
The following example allows 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
[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
,
, and
resize
move
...
import mx.events.UIEvent;
[Event("resize")]
[Event("move")]
[Event("draw")]
class mx.core.UIObject extends MovieClip {
...
}
To broadcast a particular instance, call the
dispatchEvent() method" on page
About the Bindable tag
Data binding connects components to each other. You achieve visual data binding through the
Bindings tab of the Component inspector. From there, you add, view, and remove bindings for a
component.
Although data binding works with any component, its main purpose is to connect user interface
components to external data sources, such as web services and XML documents. These data
sources are available as components with properties, which you can bind to other component
properties.
flavorStr
events:
draw
948.
and
properties to be displayed in the
colorStr
event:
click
method. See
dispatchEvent()
Creating the ActionScript class file
"Using the
939
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers