AIR Monster Attack

September 26th, 2007 § 4 comments

lizardWell that was easy!

I made a quick AIR version of my monster attack “application”. The copy of AIR for JavaScript Developers Pocket Guide that they gave us at the on AIR Tour Bus event was very helpful (along with the demos that they actually presented at the event).

All I had to do was create the application descriptor XML file and add a bit of AIR code (in JavaScript) to maximize the window and make it “always on top” (or alwaysInFront in the AIR API), and voilร : monster attacking your desktop!

It’s not quite finished though. The biggest problem is that the current beta of the AIR runtime does not display animated GIFs correctly (it just displays the first frame), so the fires do not look right (this is a known bug and should be fixed by the 1.0 release of AIR). I may change the code to do the animations myself. Besides that, I have not created any application icons yet, and has only been tested on Windows, on a single machine :P No idea how well it runs on the Mac. UPDATE: After fixing the mime type for AIR files, it now downloads on Safari on my Mac and runs correctly. On top of that, the animated GIFs run properly on Mac OS X!

If you run this, be warned that it eats a lot of CPU time, which is not a surprise; after all, it’s a full-screen transparent window!

View screenshot

I’m pretty excited about the possibilities of JavaScript/HTML AIR apps that leverage the Flex libraries in JavaScript. Plus I think it might be a great way to learn the new Flex/Flash/AS3 APIs without having to learn MXML at the same time (especially since I don’t have Flash CS3 yet).

If you have the AIR runtime installed (available here), then give this a try.

Download monster attack!

§ 4 Responses to AIR Monster Attack"

What's this?

You are currently reading AIR Monster Attack at bunnyhero dev.