Convenient Flash/Flex Docs with ASDoc and a Batch File


By daniel - Posted on 21 October 2008

Ages ago I did a quick comparison of some Actionscript documentation generators and found good tools but nothing that fit my needs perfectly. Finally, the search is over.

ASDoc is a brilliant command-line tool for generating, yep, Actionscript documentation. It's the same program used to create the pretty API pages for AS3 and Flex.

It's really easy to put up nice, clean documentation; very useful when you're working with other developers or releasing any kind of source code.

Double-Click for Documentation

To make it even simpler to generate docs after updating files, I created a simple batch file. It saves the source paths, package descriptions, titles, and footer text. There's also a PAUSE at the end there, so you can see error output before the window disappears.

@ECHO OFF
 
"C:\Program Files\Adobe\Flex Builder 3\sdks\3.0.0\bin\asdoc.exe" ^
-package com.example.geom2d "2D geometry classes." ^
-package com.example.utils "Utility classes." ^
-doc-sources "C:\\path_to_as_files" ^
-source-path "C:\\path_to_as_files" ^
-output "C:\\path_to_as_docs" ^
-main-title "Main Title" ^
-window-title "Window Title" ^
-footer "All content copyright so-and-so © 2008."
 
PAUSE

Also, if you want the full list of command-line parameters look no further.

Good Documentation Generators Good for Programming Languages

One of the reasons PHP was so successful as a language was the quick and easy-to-use documentation on its website. I can't help but think that having good, free documentation generators would be a boon for open-source contributions to a particular programming language—especially one that's so closed by nature.

I think Adobe's done a smart thing.