Many developers have expressed interest in how to create applications which do not have system chrome. It is a bit trickier than it would appear. This simple tutorial will build an application that looks like an apple and add AS3 code to allow the app to be moved and closed.
Solution
A chromeless (no system window) application that demonstrates how to use custom chrome for Flex Builder 3 Beta 3.
Detailed explanation
To make this project, you will need to use a *.gif file with a transparency. YOu can use the apple in the downloadable file below.
1. Make a new Flex project (type AIR).
2. In the <project_root>/src folder, place your transparent GIF file.
3. in the first line of MXML, add the following attributes in bold below: <mx:WindowedApplication name="MyApple"creationComplete="init()" showFlexChrome="false" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
4. In the <project_root>/src folder, open the XML file named "<your_project_name>-app.xml" and modify the two lines of code below:
<!--<systemChrome>none</systemChrome>--> changed to: <systemChrome>none</systemChrome>
and:
<!--<transparent>true</transparent>--> changed to:
<transparent>true</transparent>
Do this by removing the commenting characters.
5. Save and close the application descriptor file you modified in step 4.
6. Add the following style block to your project under the first line:
<mx:Image id="mainPanel" x="42" y="10" width="363" height="343" source="assets/apple.gif" scaleContent="true" autoLoad="true"/> <mx:Text x="104" y="82" text="This is an Adobe AIR Application. AIR allows you to define applications that break existing boundaries (examples - rectangles)." width="220" height="215" fontFamily="Verdana" fontWeight="bold" fontSize="20" textAlign="center"/> </mx:WindowedApplication>
8. You can now build your application. Note that you cannot move it or close it by interacting with it. To close it, you have to right click or ctrl click on the dock icon and select "quit".
9. Add the new lines of code (in bold) to add these behaviors.