I've converted the iframe demo found in the HTML in Flex post into an AIR demo. In this post is a badge to install the application, a link to the source, and a list of the differences between the two versions.
A badge to install and run the application is on this separate page until I can figure out how to get Movable Type to stop entitizing scripts. You can also view the source of the demo here.
The AIR HTML demo shows how easy it is to switch from using an iframe to mx:HTML. Of course, it may not be easy to convert some of the particulars of a large application or to convince your boss to use AIR, but the basic conversion only takes a few hours.
Here's what had to change from the iframe demo:
- The IFrame component has been removed and is simply replaced with mx:HTML. The 'source' attribute changed to 'location'.
- No HTML wrapper file is needed, since this is an AIR application. But an AIR badge, not included in these source files, is used to launch the AIR app from a web page. You can find the source to the badge that was used on Adobe Labs.
- Application changed to WindowedApplication, as is needed for all AIR applications.
- HTMLDemo-app.xml was added, the AIR configuration file.
- Cleaned up the MXML, moving code into functions.
- Used the HTML events to show a busy cursor when a page is loading.
- Added back some sites that didn't work in the Flex version.
- Added Wacky HTML mode for the fun of it, to show how easy it is to change the display of HTML in an AIR app.
Comments (2)
Hi,
Really its looking at good. But what I observed is we are unable to download files.... is there any way to down load files using mx:HTML. But if we use iframes its allowing to download files. Please revert me is there any way to download files using mx:HTML tag. It saves me a lot. Thanks in advance.
Thanks & Regards,
Siva Kumar
Posted by Siva Kumar | December 23, 2008 12:21 AM
Posted on December 23, 2008 00:21
hi,
how can i get the parameters of an element in the loaded html DOM? for example get an element id.
Posted by Hugo Miguel | February 23, 2009 10:20 PM
Posted on February 23, 2009 22:20