Specifications

265ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
Placing ASDoc comments
Place an ASDoc comment immediately before the declaration for a class, interface, constructor, method, property,
or metadata tag that you want to document, as the following example shows for the
myMethod() method:
/**
* This is the typical format of a simple
* multiline (single paragraph) main description
* for the myMethod() method, which is declared in
* the ActionScript code below.
* Notice the leading asterisks and single white space
* following each asterisk.
*/
public function myMethod(param1:String, param2:Number):Boolean {}
The ASDoc tool ignores comments placed in the body of a method and recognizes only one comment per Action-
Script statement.
A common mistake is to put an
import statement between the ASDoc comment for a class and the class decla-
ration. Because an ASDoc comment is associated with the next ActionScript statement in the file after the
comment, this example associates the comment with the import statement, not the
class declaration:
/**
* This is the class comment for the class MyClass.
*/
import flash.display.*; // MISTAKE - Do not to put import statement here.
class MyClass {
}
Formatting ASDoc comments
The main body of an ASDoc comment begins immediately after the starting characters, /**, and continues until
the tag section, as the following example shows:
/**
* Main comment text continues until the first @ tag.
*
* @tag Tag text.
*/
The first sentence of the main description of the ASDoc comment should contain a concise but complete
description of the declared entity. The first sentence ends at the first period that is followed by a space, tab, or line
terminator.
ASDoc uses the first sentence to populate the summary table at the top of the HTML page for the class. Each type
of class element (method, property, event, effect, and style) has a separate summary table in the ASDoc output.