Specifications

263
Chapter 13: Using ASDoc
ASDoc is a command-line tool that you can use to create API language reference documentation as HTML pages
from the classes in your Adobe® Flex™ application. The Adobe Flex team uses the ASDoc tool to generate the
Adobe Flex Language Reference.
Topics
About the ASDoc tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263
Creating ASDoc comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Documenting ActionScript elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269
Documenting MXML files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
ASDoc tags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Running the ASDoc tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280
About the ASDoc tool
The ASDoc tool parses one or more ActionScript class definitions and MXML files, and generates API language
reference documentation for all public and protected methods and properties, and for all
[Bindable],
[DefaultProperty], [Event], [Style], and [Effect] metadata tags.
You can specify a single class, multiple classes, an entire namespace, or a combination of these inputs as inputs to
the ASDoc tool.
ASDoc generates its output as a directory structure of HTML files that matches the package structure of the input
class files. Also, ASDoc generates an index of all public and protected methods and properties. To view the ASDoc
output, you open the index.html file in the top-level directory of the output.
Invoking the ASDoc tool
To invoke ASDoc, invoke the asdoc utility from the bin directory of your Flex installation. For example, from the
bin directory, enter the following command to create output for the Flex Button class:
asdoc -source-path C:\flex\frameworks\source
-doc-classes mx.controls.Button
-main-title "Flex API Documentation"
-window-title "Flex API Documentation"
-output flex-framework-asdoc