How do you set the position of an AS3 AIR Project window programmatically?
It is simple to do with application descriptor, but I cannot get it to work through code.
All research has lead me to stage.nativeWindow.x = 200; but this does not do anything for me.
The following has no effect:
public function Main():void
{
stage.nativeWindow.x = 200;
}
Try placing the code in an event handler:
and listen to an event, such as Event.ACTIVATE:
If that doesn’t work on it’s own, you might also try using the NativeApplication’s activeWindow property, in case the stage’s
nativeWindowproperty isn’t initialized at the time the ACTIVATE is dispatched: