Specifications
CHAPTER 13
270
*/
public var myButtonLabel:String;
A best practice for a property is to include the @default tag to specify the default value of the property. The
@default tag has the following format:
@default value
This tag generates the following text in the output for the property:
The default value is value.
For properties that have a calculated default value, or a complex description, omit the @default tag and describe
the default value in text.
ActionScript lets you declare multiple properties in a single statement. However, this does not allow for unique
documentation for each property. Such a statement can have only one ASDoc comment, which is copied for all
properties in the statement. For example, the following documentation comment does not make sense when
written as a single declaration and would be better handled as two declarations:
/**
* The horizontal and vertical distances of point (x,y)
*/
public var x, y;// Avoid this
ASDoc generates the following documentation from the preceding code:
public var x
The horizontal and vertical distances of point (x,y)
public var y
The horizontal and vertical distances of point (x,y)
Documenting properties defined by setter and getter methods
Properties that are defined by setter and getter methods are handled in a special way by the ASDoc tool because
these elements are used as if they were properties rather than methods. Therefore, ASDoc creates a property
definition for an item that is defined by a setter or a getter method.
If you define a setter method and a getter method, insert a single ASDoc comment before the getter, and mark the
setter as
@private. Adobe recommends this practice because usually the getter comes first in the ActionScript
file, as the following example shows:
/**
* Indicates whether or not the text field is enabled.
*/
public function get html():Boolean {};
/**










