1 Reply Latest reply on Mar 8, 2009 8:44 AM by AllenCobb

    No Chrome still having issues, help please.

    combustion007 Level 1
      Hey guys,

      I am trying to learn how to do NO CHROME windows. I have a small AIR Application which would like to make it without chrome and have tried the online tutorials but not having much. I am able to get the window to appear without chrome but with my original window, i have another window with systems setting pops in as well. Can anyone help me, please.

      Here is my code:
        • 1. Re: No Chrome still having issues, help please.
          AllenCobb Level 2
          To make an AIR app without chrome, you don't have to create a child window. The app itself can have no chrome. Here are the requirements for a no-chrome app:

          FIRST, in <mx:WindowedApplication> set the attribute showFlexChrome="false".

          SECOND, create an Application Descriptor XML File in the src folder named with your app's name, and with "-app" appended, as follows:

          my app startup file is src/nochrome.mxml

          my descriptor file is src/nochrome-app.xml

          (Note that this is an XML file, not an MXML file.)

          This Application Descriptor File "ADF" is normally created for you automatically when you use the Flex Builder wizard to create your AIR app. If it's not already there, then you'll need to get the contents just right. For now, I'll assume you have that file already but haven't used it; if you're not using Flex Builder, then let me know and I can post the contents of a default Application Descriptor File. But I highly recommend using the Flex Builder new file wizard to create your app.

          In the ADF, there are two settings to change; here are the values they should be set to:

          <systemChrome>none</systemChrome>

          <transparent>true</transparent> (this is OPTIONAL)

          If you're editing the automatic ADF created by Flex Builder, be sure to remove the comment prefixes and suffixes, or your edited settings will remain comments and therefore be ignored.

          Now your app will have no chrome and (if you set the transparent property) will also be transparent. So you'll want to drop at least an EXIT button on the Design page, so there will be some way to close it! You can use Debug Mode in Flex Builder to stop the app if there's no visible way to end it.

          If you are using transparency too, then the app itself (the WindowedApplication object) is transparent, so you would typically add a canvas component to the app's window, and use that for the app background. For irregular shaped apps, you might use an image component with a PNG image containing transparency. Or, you could use code to draw directly on the invisible window. Whatever other components are dropped on the invisible app window will be visible, and will appear to float over the desktop.

          If you don't set transparent to True, then the app will be visible, but will still have no chrome. But I suspect that if you're experimenting with no chrome, you'll very soon be experimenting with irregular shapes or other forms of transparency.

          hope this helps,

          Allen