In my last post, I talked about the reality of packaging OpenLaszlo applications into AIR applications. It is pretty exciting that you can successfully package OpenLaszlo apps and install them on a desktop, and have that application function – i.e. make HTTP requests, execute JavaScript and load media. However my first experiment (the OpenLaszlo Weather demo app) didn’t really delve into any AIR APIs, such as being a chromeless application or working offline.
The next logical step was to make a chromeless application. From an end-user’s perspective, that means the application is not wrapped in the operating system’s standard window. Packaging an application without chrome is actually quite easy with AIR. What’s tricky from an OpenLaszlo developer’s perspective is to supply close and minimize buttons and enable dragging. All these actions require the developer to call AIR APIs that are not available to OpenLaszlo today. They execute in a different version of JavaScript from that which is present in OpenLaszlo 4.0. So you can’t call them directly; you have to create a bridge to them. I chose the Flex 3beta1 environment as a bridge, although I think you could use Flash CS3 to create the simple interface that is needed.
Just to make sure that the application was not lame, I threw in a dataset and had it connect to an HTTP service, do some replication, and load some media.
Anyway, here is a screenshot of my application:
The screenshot is not very exciting, because you don’t see the rest of my desktop, so I’d highly encourage you to download the chromeless OpenLaszlo AIR application pictured above and install it yourself. Note that you must have the AIR runtime installed to install and run my application.
Neat! Can’t wait to try out some of this OpenLaszlo on AIR stuff for myself. 🙂
p.s. the download link seems to be broken?
Thanks for letting me know – the link is fixed now.
Hi Thr,
Im new to flex development. I would like to know how you can achieve the windowless/chromeless application in flex. I would like to see the exact the code and the version of Flex Builder used for that. It would be great if you can send a mail also on the same to my id.
Thanks in advance…
Expecting your reply.
– Ezhil
Hi Ezhil,
I wrote the above application in OpenLaszlo, not Flex, but I used a SWF9 wrapper written in Flex, so that I could compile it into AIR. I didn’t use Flex Builder; just wrote the MXML code in a text editor. For the complete source, see this follow-up post:
http://www.antunkarlovac.com/blog/?p=63
-Antun