Posts in Category "ASDocs"

Creating ASDocs for Custom Adobe AIR Components

The Flex ASDoc tool parses one or more ActionScript class definitions to generate API reference documentation for all public and protected methods and properties, and for all [Bindable], [DefaultProperty], [Event], [Style], and [Effect] metadata tags. By default, the ASDoc tool links in all of the Flex SWC files required to compile custom Flex components. However, to use ASDoc to generate documentation for custom Adobe AIR components, you must link in the necessary AIR SWC files.

For example, you create a custom component named MyAirComboBox that extends the AIR mx.controls.FileSystemComboBox component. The directory location of your custom component file is:

C:\myApplication\myComponents\MyAirComboBox.as

Use the following ASDoc command to generate API reference documentation for MyAirComboBox:

..\bin\asdoc -doc-sources C:\myApplication\myComponents\MyAirComboBox.as -library-path+=..\frameworks\libs\air -main-title "My AIR API Documentation" -window-title "My AIR API Documentation" -output air-asdoc

This command assumes the following:

  • You run the command from the directory C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\asdoc in your Flex Builder installation directory structure. If you are using the Flex SDK, or have installed Flex Builder on another operating system, modify the paths in this command as necessary.
  • The AIR SWC files are installed in the directory C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\frameworks\libs\air. This is the default directory location for a Flex Builder installation.This command uses the library-path option to the ASDoc tool to specify the directory location of the AIR SWC files. The”+=” operator to the -library-path option specifies to append the AIR SWC files to the Flex SWC files.
  • The ASDoc tool writes the output to the directory C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\asdoc\air-asdoc.

If you have created multiple AIR components, you can use the following ASDoc command to generate documentation for an entire package:

..\bin\asdoc -doc-sources C:\myApplication\myComponents -library-path+=..\frameworks\libs\air -main-title "My AIR API Documentation" -window-title "My AIR API Documentation" -output air-asdoc

See the Flex 3 documentation for more information on the ASDoc tool.

 

Stephen Gilson
Flex Doc Team