13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Working with AIR native windows<br />

The window ev<strong>en</strong>ts that dispatch an NativeWindowBoundsEv<strong>en</strong>t object are:<br />

Ev<strong>en</strong>t Description<br />

moving Dispatched immediately before the top-left corner of the window changes position, either as a result of moving,<br />

resizing or changing the window display state.<br />

move Dispatched after the top-left corner has changed position.<br />

resizing Dispatched immediately before the window width or height changes either as a result of resizing or a display<br />

state change.<br />

resize Dispatched after the window has changed size.<br />

For NativeWindowBoundsEv<strong>en</strong>t ev<strong>en</strong>ts, you can use the beforeBounds and afterBounds properties to determine<br />

the window bounds before and after the imp<strong>en</strong>ding or completed change.<br />

The window ev<strong>en</strong>ts that dispatch an NativeWindowDisplayStateEv<strong>en</strong>t object are:<br />

Ev<strong>en</strong>t Description<br />

displayStateChanging Dispatched immediately before the window display state changes.<br />

displayStateChange Dispatched after the window display state has changed.<br />

For NativeWindowDisplayStateEv<strong>en</strong>t ev<strong>en</strong>ts, you can use the beforeDisplayState and afterDisplayState<br />

properties to determine the window display state before and after the imp<strong>en</strong>ding or completed change.<br />

On some Linux window managers, a display state change ev<strong>en</strong>t is not dispatched wh<strong>en</strong> a window with a maximum<br />

size setting is maximized. (The window is set to the maximized display state, but is not resized.)<br />

Displaying full-scre<strong>en</strong> windows<br />

Adobe AIR 1.0 and later<br />

Setting the displayState property of the Stage to StageDisplayState.FULL_SCREEN_INTERACTIVE places the<br />

window in full-scre<strong>en</strong> mode, and keyboard input is permitted in this mode. (In SWF cont<strong>en</strong>t running in a browser,<br />

keyboard input is not permitted). To exit full-scre<strong>en</strong> mode, the user presses the Escape key.<br />

Note: Some Linux window managers will not change the window dim<strong>en</strong>sions to fill the scre<strong>en</strong> if a maximum size is set<br />

for the window (but do remove the window system chrome).<br />

For example, the following Flex code defines a simple AIR application that sets up a simple full-scre<strong>en</strong> terminal:<br />

Last updated 6/6/2012<br />

915

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!