I want my AIR application to launch at 100% width and height, or maximized in PC speak. So I had assumed this would be easy, either by setting the width and height of my WindowedApplication to 100% in my application mxml file, or by doing the same using the width/height nodes in the application xml file. Neither approach seemed to work…
Instead i resize my application once its fully initialized, using the code below, which grabs the visibleBounds of the main screen (meaning it takes into account the size of the taskbar), and resizes accordingly:
-
{
-
var screen:Screen = Screen.mainScreen;
-
-
this.width = screen.visibleBounds.width;
-
this.height = screen.visibleBounds.height;
-
this.move(0,0);
-
}
UPDATE
Thanks to Tim (see comments) theres an even easier way:
stage.nativeWindow.maximize();

Not sure if this works for WindowedApplication, but for Window this works as well:
nativeWindow.maximize();
-TH
Chuckle. Yeah thanks Tim, that does work!
Very cool. There may be some situations though, where re-sizing the app to full-size would be desired.
-TH
[...] here: Vivace Interactive: Flash / Flex Developer, Auckland New Zealand … Comments [0]Digg [...]
One thing that I found difficult was to prevent the user from exiting the FULL SCREEN. One of my ideas was to do a KIOSK so that the user will not be able to interact with the WINDOWS DESKTOP but only with the KIOSK. Any ideas anyone?
Thanks.
Огромное вам человеческое спасибо, очень актуальная заметка.
Thanks for this post. By the way nativeWindow.maximize() works also on WindowedApplication