About the Inspectable tag
You use the Inspectable tag to specify the user-editable (inspectable) parameters that appear in the
Component inspector and Property inspector. This lets you maintain the inspectable properties
and the underlying ActionScript code in the same place. To see the component properties, drag
an instance of the component onto the Stage and select the Parameters tab of the Component
inspector.
Collection parameters are also inspectable. For more information, see
"About the Collection tag"
on page
942.
The following figure shows the Parameters tab of the Component inspector for the DateChooser
component:
Alternatively, you can view a subset of the component properties on the Property inspector
Parameters tab.
When determining which parameters to reveal in the authoring environment, Flash uses the
Inspectable tag. The syntax for this tag is as follows:
[Inspectable(value_type=value[,attribute=value,...])]
property_declaration name:type;
The following example defines the
parameter as inspectable:
enabled
[Inspectable(defaultValue=true, verbose=1, category="Other")]
var enabled:Boolean;
The Inspectable tag also supports loosely typed attributes like this:
[Inspectable("danger", 1, true, maybe)]
The metadata statement must immediately precede the property's variable declaration in order to
be bound to that property.
Creating the ActionScript class file
937
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?