Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Reference

(nextflipdebug5) #1

74 | Chapter 4: AIR Mini-Cookbook


To create a full-screen window without any chrome, the
NativeWindowInitOptions.systemChrome property should be
set toNativeWindowSystemChrome.NONE. The application can
then subsequently call theNativeWindow.maximize( )method,
or setNativeWindow.boundsdirectly. TheNativeWindow.bounds
property takes aflash.geom.Rectangleobject which specifies
horizontal and vertical origination, as well as width and
height. Either approach fills the viewable screen with the
newly created native window.


var options = new air.NativeWindowInitOptions( );
var login = null;

options.minimizable = false;
options.maximizable = false;
options.resizable = false;
options.systemChrome = air.NativeWindowSystemChrome.NONE;

login = new air.NativeWindow( false, options );
login.maximize( );

Table 4-1. String constants in NativeWindowSystemChrome


String constant Description
NativeWindowSystemChrome.STANDARD This is the default for
NativeWindow and reflects
the window chrome used on the
specific operating system.
NativeWindowSystemChrome.UTILITY Utility chrome is best suited for
related windows that will be
present for an extended amount
of time such as tool panels.
NativeWindowSystemChrome.NONE Indicates that no chrome should
be present, and requires that the
application handle all traditional
windowing tasks.
NativeWindowSystemChrome.ALTERNATE Not implemented for the Adobe
AIR Beta.
Free download pdf