Application vs. WindowedApplication

english mobile

When I first saw Flex and what it could do, I was really excited. I started my working life as a graphic designer, so I'm always interested in the visual possibilities of a new tool. One of the things I spotted right away is that you can make an AIR application that floats on top of the desktop, with a drop shadow and full alpha transparency.

I trotted off to try to make my first AIR app with these features, and it was like hitting a brick wall. I tried everything the Help suggested, to no avail. Finally, I noticed that in the examples, the base tag was Application and not the WindowedApplication you get as the default when you start an AIR project. If you change the base tag to Application, then everything works as expected.

I find that very puzzling, because the main difference between Application and WindowedApplication is that Application is for a file designed to run in a web page and WindowedApplication is designed for AIR. Correct me if I'm wrong, but it seems to me way more useful to have a transparent window for a desktop application than one that is stuck in a window that is decidedly not transparent, ever. Yes, I know about the whole WMode thing, but it seems to me that its chief use is to annoy the snot out of hapless users who find themselves visiting a page that likes to run its ads over the top of the content. I'd be interested in finding out the real reason behind this odd dichotomy.

Updated September 24, 2008:
To find the real solution to this problem, you had to read my comment, follow the links, and then read the comment on the post it linked to. So I'm going to summarize the solution here.

To make the main application window transparent in AIR, you need to edit the {YourAppName}-app.xml file to change these values in the initialWindow section:
systemChrome (set to "none")
transparent (set to "true")

Then, set the showFlexChrome property in the WindowedApplication tag to "false".

2 comments:

Unknown said...

What are you using to create the Flex content?

I found it quite easy to create AIR content with Flex Builder 3.

Mark

Amy B said...

I found out what was going on with the Application tag in the comments to this blog posting http://technoracle.blogspot.com/2007/07/air-apple-shaped-application.html.