User Guide

152 Creating Components
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.
The following table describes the attributes of the Inspectable tag:
None of these attributes are required; you can use Inspectable as the metadata tag.
All properties of the superclass that are marked Inspectable are automatically inspectable in
the current class. Use the InspectableList tag if you want to hide some of these properties
for the current class.
Attribute Type Description
defaultValue
String or
Number
(Optional) A default value for the inspectable property.
enumeration
String (Optional) Specifies a comma-delimited list of legal values
for the property.
listOffset
Number (Optional) Added for backward compatibility with Flash MX
components. Used as the default index into a List value.
name
String (Optional) A display name for the property. For example,
Font Width. If not specified, use the property’s name, such
as
_fontWidth.
type
String (Optional) A type specifier. If omitted, use the property’s
type. The following values are acceptable:
Array
Boolean
Color
Font Name
List
Number
Object
String
variable
String (Optional) Added for backward compatibility with Flash MX
components. Specifies the variable that this parameter is
bound to.
verbose
Number (Optional) An inspectable property that has the verbose
attribute set to 1 does not appear in the Property inspector
but does appear in the Component inspector. This is
typically used for properties that are not modified frequently.