Using ASDoc as an External Tool in Flash Builder 4
Line Break
Author: Arjan (47 Articles) - Author Website
Arjan is a SAP Consultant specialized in ABAP and Front End development techniques like Web Dynpro, Adobe Interactive Forms, Flex and AIR. In his free time he likes to create examples for Flex-Blog and other applications using Flex, AIR and PHP. Other hobbies are movies and music. He is also the co-owner of Flex-Blog.com.
When developing Flex and AIR applications for clients / customers it’s always nice to deliver a structured structured Flash Builder project with well documented sources.
Similar to JavaDoc for Java, Actionscript has the opportunity to use a tool that generates HTML files in which you can navigate through all your project packages, ActionScript Classes and MXML files. ASDoc is essentially a command line tool, but you can configure Eclipse / Flash Builder in such a way that you can run ASDoc with a click of a button. This example show you how to do this.
Here is an example of what ASDoc can output for you:

Let’s configure Flash Builder so that we can do this with one click of a button!
First, open the external tools configuration in your Flash Builder and create a new configuration by clicking on the new launch configuration icon:

Set the following for the configuration values:
If you are using any external libraries (SWC files) in your project, you need to specify them as well (in my example, they are located in the libs folder in my project):
After that, you should see something like this:

Now you’re all set, you can generate ASDoc for your project by clicking the External Tools button in you Flash Builder.

This will automatically output all files to [your project location]\asdoc-output. When asdoc.exe finishes, open the index.html file to see the result.
For information how to comment your Classes, Methods, MXML Files and such, take a look at the ASDoc documentation from Adobe here.
Note: This example assumes that you are using the Flex 4 SDK, for all other SDKs you should pick the correct location of asdoc.exe on your filesystem to get it working for your project.
Related posts:
- Flex 4 / Flash Builder 4: baseColor changed to chromeColor
- Connect to Google Analytics from Flash Builder
- Call Javascript function from Flex / Flash Builder (AS3)
- Using States in Flash Builder
- TinyURL usage with Flash Builder
Comments
3 Responses to “Using ASDoc as an External Tool in Flash Builder 4”



(
Thanks!, this was very helpful.
Sweet.
When naming an External Tool Configuration, names such as ASDOC 3.4, ASDOC 4.1 help for targeting the different SDK’s you may be using.
Hi, its really very helpful to us. Thankyou very much.
And i have small doubt here. I have to even include the library projects here, so i have given like
-source-path src
-doc-sources src
-external-library-path libs
-doc-sources ../XXXLib/src
-doc-sources ../XXXLib/src
But i cannot generate the ASDOC, could u please help me, in solving out this problem, if i dont have a library project included in my application ,its working fine.