AIR Tip: Using showFlexChrome to Properly Skin the Employee Directory Example Application

AIR Tip: Using showFlexChrome to Properly Skin the Employee Directory Example Application

While I was preparing to present an overview of AIR at last week's Adobe Flash Platform User Group I started looking at the example application Employee Directory. After downloading the source code one of the first things I noticed was that the application had an application skin (which looked to me a lot like a Mac OS X skin) and I could not figure out why it was there. It didn't make a lot of sense to me that an application that looked like it did should have no "systemChrome" at all.

Today, while working on a different application I ran across the same problem and discovered a new feature in the beta (I believe) that didn't get placed into the source code for the example. I found the attribute showFlexChrome by looking at the WindowedApplication entry in the livedocs. Please note, although this is considered to be a style attribute, there is no CSS inheritance so you can't just place it into your CSS file.

Here's where I found the clue that made me check the language reference:

"systemChrome If you set this attribute to standard, system chrome is displayed, and the application has no transparency. If you set it to none, no system chrome is displayed. When using the Flex WindowedApplication component, the component applies its custom chrome."

I would suggest that something like this be added to that paragraph:

"When using the Flex WindowedApplication component, the showFlexChrome attribute can be used to control the Flex custom chrome. Setting showFlexChrome to false in conjunction with setting your root context's systemChrome attribute to false and transparent to true will display no system chrome at all.

Inside the Employee Directory example application's WindowedApplication I added the attribute showFlexChrome and set it to false. After adding this option the application looked and worked great.

If you are in Atlanta and would like to learn more about AIR, John Mason will be presenting "New Features in Flex 3 and AIR" on Wednesday, July 18.

By the way, I really like the look and feel for the livedocs for AIR.

 

Comments (1) | Print | Send | del.icio.us | Digg It! | Linking Blogs
4219 Views

Comments

gregory's Gravatar Thanks! this is exactly what I was looking for. Several tutorials I have read suggested changing the main application tag from WindowedApplication to Application. However, doing this caues stage.stageHeight to no longer work, meaning you can no longer dynamically adjust the total size of the window. merely setting the showFlexChrome attribute to false works perfectly!

thanks again!
# Posted By gregory | 9/23/07 3:11 PM