You might already know that ASDoc support was added in Flash Builder 4. We show ASDoc content in code hints, hovers and in the new ASDoc view. We have built-in support for showing ASDoc content from:
- Flex 4 SDK
- playerglobal.swc and airglobal.swc
- Referenced library projects in the current workspace
- ASDoc content in your current project
However, what we don’t provide is a way to distribute SWCs that bundle ASDoc content without distributing your source code.
Gaurav wrote a great blog post going into detail on how the SDK uses Ant to include ASDoc using framework.swc as an example. You should be aware that te SDK bundles ASDoc a little differently in order to create local-specific resource bundles that contain local-specific ASDoc content. What that means for our users is that ASDoc content in Flash Builder is localized.
I’ve put together an example library project that you can download that contains a simple Ant script you can use for your own projects. Instead of creating a separate resource bundle, this script essentially runs the ASDoc tool, unzips your SWC, then bundles the ASDoc DITA files into the SWC.
Download: ExampleFatSWC.zip
In Flash Builder:
- File > Import, Flash Builder > Flash Builder Project
- Browse to the ZIP file
- Finish
- Right click on the build.xml file and choose Run As > Ant Build
- The “fat” SWC is in your /bin folder ready to be shared
When your users add the SWC to their project library path, they’ll see ASDoc content without any extra work.
Remember, to run Ant within Flash Builder, you’ll need to download the Eclipse Java Development Tools from the appropriate update site. For Eclipse 3.5 or Flash Builder Standalone users, use http://download.eclipse.org/releases/galileo and look for “Eclispe Java Development Tools”.
Share on Facebook

When I try to import the sample project I get an error message ” The specified file is not a valid archive file.”
Hmm. Just moved to WordPress and looks like there’s some problems with the ZIP. I’ll take a look.
The example project download seems to have gone missing; I’m getting “Page Not Found” from the link in this post.
Fixed
code hints mxml are soooo annoying