Here is a quick little demo you can look at:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
private function goFullScreen(event:MouseEvent):void
{
stage.displayState = StageDisplayState.FULL_SCREEN;
goFullButton.visible = false;
goNormButton.visible = true;
moveWindow.visible = false;
}
private function goNormalScreen(event:MouseEvent):void
{
stage.displayState = StageDisplayState.NORMAL;
goFullButton.visible = true;
goNormButton.visible = false;
moveWindow.visible = true;
}
private function moveThisWindow(event:MouseEvent):void
{
var win:NativeWindow = this.stage.nativeWindow;
win.x = 600;
win.y = 300;
win.width = 400;
win.height = 200;
}
]]>
</mx:Script>
<mx:Button id="goFullButton" label="Full Screen" enabled="true"
click="goFullScreen(event)"/>
<mx:Button id="goNormButton" label="Normal Screen" enabled="true"
click="goNormalScreen(event)" visible="false"/>
<mx:Button id="moveWindow" label="Move Window" enabled="true"
click="moveThisWindow(event)" x="200"/>
</mx:WindowedApplication>
--- In [email protected], "sudha_bsb" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> How to change an AIR application width and height at run time.
>
> Also how to change the x and y coordinates at run time.
>
> I am trying to change them by accessing with this..
>
> this.width
> this.height
> this.x
> this.y
>
>
> This is not helping always...
>
> Please help...
>
> Thanks,
> Sudha.
>