create windowed applications with no system chrome

To  build a AIR application with custom window(which has your own shape), try the fallowing:

In the <project_root>/src folder, open the XML file named “<your_project_name>-app.xml” and modify the two lines:

<!–<systemChrome>none</systemChrome>–>
to
<systemChrome>none</systemChrome>

and

<!–<transparent></transparent>–>
to
<transparent>true</transparent>

Then in your main page,

<mx:WindowedApplication xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” showFlexChrome=”false”>

<mx:Script>
<![CDATA[
public function startMove(event:MouseEvent):void {
stage.nativeWindow.startMove();
}
]]>
</mx:Script>

<mx:Image id=”mainPanel”  mouseDown=”startMove(event)”  x=”10″ y=”10″ width=”300″ height=”200″
source=”myBg.gif /*path to a transparency image*/” scaleContent=”true” />

Permanent link to this article: https://blog.openshell.in/2010/12/create-windowed-applications-with-no-system-chrome/

Leave a Reply

Your email address will not be published.