Modified as2api Source Code
- Development
If you have ventured into our Media Framework documentation, you will notice that we have matching docs generated for ActionScript 2 and ActionScript 3. Thanks to Adobe, we have an official documentation tool (ASDoc included in the Flex SDK) for ActionScript 3 chunked full of features. For ActionScript 2 we had to rely on the community and ended up using the open source as2api project. Unfortunately as2api lacked some of the features we used from ASDoc, so we modified the source to enable it to do some of the things we wanted.
Modifications
Expose/hide private members
as2api hides all private members by default. We wanted the option to treat private members like they were protected members and document them if we wanted. Therefore we made exposing private members optional, defaulting to exposing them.
To usage for this option:
--hide-private
Hide members with @private tag
A common tag in ASDoc is @private which allows you to selectively hide certain members from being exposed/documented. This helps keep your documentation from appearing really cluttered, which was our case in exposing all private members. This tag can now be used in your documentation preceding a member declaration to hide it from the docs.
Document Event metatags
Obviously ActionScript 2 didn't have a formal event framework. However, we created one that mimics ActionScript 3 and wanted it documented in the same fashion. We didn't put all the same hooks in as ASDoc, but we got the basic event listing and class references.
To tag an event to be documented place the metatag prior to the event like ASDocs.
[Event(name="bufferTimeStarted", type="com.dreamsocket.events.BufferTimeEvent")]
It felt only right to contribute those changes back the community, so we are posting the source and binary here for anyone wanting to take advantage of our changes.
Download
The caveat here is that Chad had never seen Ruby prior to this project, so he just hacked the source. It may not be the prettiest code, but it works. Who knows how many people are still maintaining ActionScript 2 libraries, but hopefully this will come in handy to someone. Happy code documenting :).
