Asdoc GUI and CommandProxy

This is something I’ve been wanting to do for quite some time.

Many moons ago, I created a simple GUI for asdoc.exe (the tool that creates nice looking HTML documentation from actionscript class files for those wondering – though I can’t imagine anyone reading this and not knowing) using SWFKit. Well, it was about the same time that Apollo first appeared (or maybe it was AIR beta 1 by that time – who can remember), and I thought it would be great to convert the whole project into an AIR application. It didn’t take long, though, to discover that AIR was not capable of launching applications in their native habitats, so that ended that. Then back in January, Mike Chambers published a means of integrating AIR with C-Sharp thereby gaining a closer OS relationship. This would let you do things like launch applications and take screen shots straight from AIR.

Finally, four and half months later, I got the time to “play around” and test out this intriguing proof of concept. And so enters ASDoc GUI version 2.0 – this time created in Flash/AIR but, thanks to CommandProxy, capable of launching asdoc.exe.

You can see some screenshots below.

You can download the project here, but because this was only a test of Mike Chambers’ concept, I didn’t bother building a custom installer and manual installation, while not wildly difficult, may be a bit tricky.

To install:

  1. Download the .zip file here and extract to wherever desired.
  2. Install the ASDocGUI.air file (requires latest version of AIR runtime to be installed), but don’t run it (well, you can go ahead and run it if you want to. It won’t break anything – but it won’t work, either).
  3. Navigate to the installation directory (on Windows that’s C:\Program Files\ASDocGUI by default) and drop in the GUILauncher.exe file. GUILauncher.exe and ASDocGUI.exe should reside in the same directory.
  4. Now simply run GUILauncher.exe – it will automatically launch the AIR application and you’re in business. If you desire a shortcut on your desktop (or anywhere else) make sure it’s a shortcut to GUILauncher.exe.

The above instructions also come in a readme.txt file included in the .zip.

A few things to consider:

This isn’t the prettiest application ever created. Because this was all just a test of Mike Chambers’ ideas I didn’t do much beautification. The design is simple as heck. The GUILauncher.exe will run at the same time as the AIR app. Don’t close it, it’s necessary and will also provide a little feedback about what’s going on inside a console window. Speaking of feedback, expect little to none. The application works fine when all goes well, but when it doesn’t go so well, it will fail silently. Make sure you know generally what you’re doing as far as asdoc commands and expectations are concerned. If I get a bit of positive feedback, I just may make a more user friendly version. It works fine for what I use it for, however, and it certainly served its purpose demonstrating the CommandProxy concept.

Speaking of which, the CommandProxy concept is, first of all, very simple to put into effect. I believe the largest amount of development time went into creating an Accordion component (which I will post at a later date after I clean up and better document the code as it’s now a part of my ui package). I see no reason why Adobe should not implement a similar .api in AIR itself in a later release. I understand that security is a concern, however, other .swf wrappers (Zinc, SWFKit, etc) have been doing these types of things for years. I see no reason why Adobe shouldn’t hop on board and really utilize it’s own technologies to the fullest extent.

By the way, if anyone tries this out with a MAC, please post a comment. I’m curious to hear the results.

For more information on the CommandProxy “Proof-of-Concept”, get it straight from the horse’s mouth.

14 Comments »

  1. David R says:

    “I see no reason why Adobe shouldn’t hop on board and really utilize it’s own technologies to the fullest extent.”

    There’s really one main reason they didn’t add this feature: They want to try and force people to make cross-platform AIR apps. By making it hard to call native code, they hope to encourage people to only use cross-platform SWF/HTML content. As you’ve noted, it’s not really a security concern, since AIR apps already have plenty of access to the filesystem and could easily cause all sorts of trouble as is.

    Personally I think it’s dumb to cripple a tool to enforce an ideology.

  2. Devon O. says:

    That’s a good point, David R, and actually one I meant to bring up. I wouldn’t call it “dumb” to encourage cross platform development – it really is AIR’s biggest and best feature and is quite an achievment so far. However, they (the Adobe team) have already blurred the line a bit. For example, the NativeMenu object supports an Application menu (for Mac OS X) and a Window menu (for Windows) as well as a Dock icon (Mac) and System tray icon (windows). I think they could “easily” extend the File object’s api to include a launchNativeApplication() method that varies according to OS in a way similar to NativeMenu. Of course it could be argued this is a slippery slope and soon everyone would want all OS api’s exposed in some way, but I don’t think so. I believe that such base abilities as taking screen shots or launching native applications are at least as important as adding dock or system tray icons. But maybe that’s just me.

  3. Brett Walker says:

    Devon, this looks great (why hasn’t Adobe provided an ASDoc GUI?), but your suggestion to try it on a Mac would be fruitless, since you provided an EXE file which would only run under Windows!

  4. Devon O. says:

    We’ll just pretend I didn’t say that.. :)

  5. noponies says:

    Looks promiing, but I the GUILauncher.exe app fails to launch on XP for me..

  6. Devon O. says:

    I apologize for the difficulties, noponies. I created the whole thing on Win XP and it works fine for me. I can’t tell what the problem may be.

  7. Varun Shetty says:

    I was googling around for GUI tools and got two tools probably developed by you. Seems like you are the ASDocs guru.

    well none of the tools worked for me as I get this error.
    pnpDetails.mxml: Error: Unable to locate specified base class ‘view.panels.customPanel’ for component class ‘pnpDetails’

    I have a customPanel.mxml which is a customised panel and i am using it in other custom mxml components.

    my panels start like this

    ….
    ….

    do you think, that would be a problem. How do I solve this.

  8. Varun Shetty says:

    oops.. some tags jus disappeared

  9. Devon O. says:

    Hey, Varun.. Don’t know how I became an ASDoc guru and I’m honestly not sure if I could help out or not, but go over to the contact form at http://www.onebyonedesign.com/index2.html (“when” section) and drop me a direct line and we can try to figure out what’s happening..

  10. noponies says:

    Devon,

    I’m running XP via virtulisation, so thats prob why. In the end I just wrote an ant task for flex, works like a charm.

    Congrats on your guru status!

  11. Devon O. says:

    Wait a minute. I have guru status?
    Glad you got it working noponies…

  12. Robert_t says:

    Looks cool and I was looking forward to not having to type in the command line anymore – but, same problems as noponies. I’m running XP in Bootcamp on a Mac so guess this may have the same issue :-(

    oh well!

  13. [...] want what appears to be easy way to use ASDoc, you may want to check out Devon O. Wolfgang’s ASDoc GUI – AIR app created to make using ASDoc a little bit easier. Unfortunately, the AIR app uses a [...]

  14. Very nice! :) I was hoping something like this was around.

    I’m currently using a plugin for FlashDevelop, but it doesn’t have as many options, and isn’t really all inclusive of the different options available in ASDoc, and instead you have to type those values in manually.

    Does this work with the newest release of ASDoc (currently in BETA)? I use that version because the current one does not support typed Vectors.

RSS feed for comments on this post. / TrackBack URI

Leave a Reply

Devon O. Wolfgang

Technical Reviewer of “The Essential Guide to Flash CS4 AIR Development”

Contributing Author of “Flash AS3 for Interactive Agencies”

Senior Software Developer in Dublin, Ireland

Portfolio

Bayer Pixel Bender Filter

Bayer Mosaic Filter in Pixel Bender


Now, seeing as how I’ve been trying to learn some Pixel Bender coding lately[...]

Liquitext

Liquid Text Effect


Haven’t been too active around here lately due to a major on going project at work lately as well as the fact that my wife and I are in the slow process of moving homes. Really, the only free time it seems I have these days is during the lunch hour. So, over the past two days, I came up with this fun little toy during lunches[...]

Google’s Text To Speech Engine in Flash

I’m not sure how I managed to miss this, but I just happened to run across a ‘new’ (well, newish), albeit still unofficial, offering of Google today: text-to-speech. You can see what few details there are on this Techcrunch post. Basically, it just boils down to this though – you send your phrase to be [...]

Quick Sound Effects Generator


Need some beeps, boops, or bops, to go with your UI or games [...]

Quick QuickBox2D Tip II – Collision Detection

Custom collision detection/handling in QuickBox2D [...]

None of This Runs Eternal


No Flash/Actionscript stuff here. Just me rambling about the upcoming Current 93 concert [...]

Playing Around with the New UndoManager

Included in the Flex 4.0 SDK and the, just released, Flash Professional CS5 lies a new hidden little gem of a class: flashx.undo.UndoManager (although the Flex 4.0 SDK’s been out for awhile, I have to admit I didn’t even notice this until I installed Flash CS5 and started poking around the documentation looking for new [...]

Making Waves

In a previous post, “Digging into the Microphone in Flash Player 10.1″, reader David Law asked in the comments how it would be possible to save .wav files to the server. I wasn’t sure right offhand, but thought I’d spend my lunch hour yesterday looking into it. Well, after reading this quick tutorial on Adobe [...]

Some Drawing Fun and a Bad Movie You’ll Never See

Earlier today, Dave Gillem posted a link on Facebook to an incredible Processing based drawing application. Thought I’d have a go at reproducing something similar in Flash. Well, I failed miserably, but the results were still interesting enough to check out. You can play around with it below. Just mouse down to draw in the [...]

Animating Bezier Curves


The other day I got the notion in my head that I wanted to draw some bezier curves in an animated fashion. I’m sure this has been done a million times before, but sometimes reinventing the wheel can be a good learning experience [...]

My God, It’s Full of Stars…


Just a quick little thing I got an idea for (i.e. pretty much ripped off) while browsing Processing examples.

Another Year, Another Look

As a few folks may have noticed, the blog is looking a little bit different as of today [...]

The Webcam Warholizer


Just a little bit of quick Friday fun with webcam and bitmapata…

More With the JiglibFlash Terrain

Playing around a bit more with the animated JiglibFlash terrain idea from my last post, I wanted to see how it would work in conjunction with a webcam. So, needless to say, you’ll need a webcam to check out the results below.

Rockin and Rollin with the JiglibFlash Terrain


Finally got the chance to play around with the new JiglibFlash height map terrain, today, and have to say I am very impressed [...]