Flex 2 ASDoc Mini How-To

Posted on August 24, 2006 | Comments Off

I didn’t think much of my use of ASDoc when I created my Flex 2 / FMS ConnectionMonitor component. But I guess usage of the ASDoc is not straight forward and some people might want an example of how to use it.

You’ll find the ConnectionMonitor Component’s source and sample ASDoc documentation located here.

1. Grab the source and deploy it in a folder (ie: C:\renaun_com_FMS).

2. Make sure asdoc.exe in your cmd prompt path

3. Open an cmd prompt and navitgate to the src folder in download folder. (ie: C:\renaun_com_FMS\src)

4. Here is the command

C:\renaun_com_FMS>asdoc -output docs -doc-sources ./com -source-path ./com -external-library-path “c:\renaun_com_FMS\bin\RIALogger.swc” -main-title “Renaun Erickson’s Flex/FMS ConnectionMonitor” -footer “Coypright 2006 Renaun Erickson (http://renaun.com)”
5. You should see the documentation in the C:\renaun_com_FMS\src\docs folder.

For explanation on the parameters used look at http://labs.adobe.com/wiki/index.php/ASDoc:Using_ASDoc

Hopefully this makes sense. The quirks I had was that in the src folder there is a com and a scriptlib folder. I wanted asdoc to only look in the com folder for source files to document, thus I had to use ./com in the -doc-sources and -source-path parameters. And I ended up using -external-library-path instead of -library-path because of errors. (Error: Unable to resolve a class for ResourceBundle: logging.) I was then informed I needed to use += to resolve the -library-path errors.
After more testing I got -library-path to work with the command below, had to put “” around the whole -library-path part (thanks Brian):

C:\renaun_com_FMS>asdoc -output docs -doc-sources ./com -source-path ./com “-library-path +=c:\renaun_com_FMS\bin\renaun_com_Logger.swc” -main-title “Renaun Erickson’s Flex/FMS ConnectionMonitor” -footer “Copyright 2006 Renaun Erickson (http://renaun.com)”