Specifications

273ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
Documenting default properties
The [DefaultProperty] metadata tag defines the name of the default property of the component when you use
the component in an MXML file.
When ASDoc encounters the [DefaultProperty] metadata tag, it automatically adds a line to the class
description that specifies the default property. For example, see the List control in Adobe Flex Language Reference.
For more information on the [DefaultProperty] metadata tag, see “Metadata Tags in Custom Components” on
page 33 in Creating and Extending Adobe Flex 3 Components.
Documenting effects, events, and styles
You use metadata tags to add information about effects, events, and styles in a class definition. The [Effect],
[Event], and [Style] metadata tags typically appear at the top of the class definition file. To document the
metadata tags, insert an ASDoc comment before the metadata tag, as the following example shows:
/**
* Defines the name style.
*/
[Style "name"]
For events and effects, the metadata tag includes the name of the event class associated with the event or effect.
The following example shows an event definition from the Flex mx.controls.Button class:
/**
* Dispatched when the user presses the Button control.
* If the <code>autoRepeat</code> property is <code>true</code>,
* this event is dispatched repeatedly as long as the button stays down.
*
* @eventType mx.events.FlexEvent.BUTTON_DOWN
*/
[Event(name="buttonDown", type="mx.events.FlexEvent")]
In the ASDoc comment for the mx.events.FlexEvent.BUTTON_DOWN constant, you insert a table that defines
the values of the
bubbles, cancelable, target, and currentTarget properties of the Event class, and any
additional properties added by a subclass of Event. At the end of the ASDoc comment, you insert the
@eventType
tag so that ASDoc can find the comment, as the following example shows:
/**
* The FlexEvent.BUTTON_DOWN constant defines the value of the
* <code>type</code> property of the event object
* for a <code>buttonDown</code> event.
*
* <p>The properties of the event object have the following values:</p>
* <table class=innertable>
* <tr><th>Property</th><th>Value</th></tr>
* ...