Archive for January, 2010

CSDoc – Create Flash CS3 & CS4 code hints using ASDoc

For the past few years I have been managing a sizable Flash API that is distributed to clients via an Adobe extension (MXP). Managing the compilation of the MXP file is a headache on its own (and worthy of a separate post). In addition, there is little to no documentation on building an extension that integrates nicely with the Flash IDE.

Sure, you can get your class files to install into the IDE’s class path, but what about adding code hinting and highlighting? I have not found many reliable resources on this topic, and everything I’ve learned has been by digging into the guts of the installed IDE files.

So, long story short, I’ve developed an AIR app that will use ASDoc to analyze your AS3 API and generate the files needed to add code hints within the Flash IDE.

The application, CSDoc, can be installed from the badge below. It is extremely simple (read: ugly) but gets the job done. Just follow the steps below to get the required XML docs for addition to your MXP:

Note: You do not have to actually use ASDoc comments in your code, but it is recommended.

  1. Run ASDoc on your project with the added argument: -keep-xml
  2. Use the “Browse” button to locate the toplevel_classes.xml file created by ASDoc
  3. Review the XML generated (if you really care…)
  4. Export the XML files to disk (I recommend keeping them in a directory with your project) and include them in your MXP

Please let me know in the comments if you find this useful or have any problems.

[swfobj src=”” width=”217″ height=”180″ flashvars=”appname=CSDoc&appurl=”]

For anyone interested, this all started with a post by Rob Dixon, which is pretty outdated now:  Use ASDoc to drive new processes