| Package | flash.display |
| Class | public class NativeWindow |
| Inheritance | NativeWindow EventDispatcher Object |
A reference to the NativeWindow is returned by the window constructor. A reference to a NativeWindow instance
can also be accessed using the Stage.window property of any display object on that window's stage:
var window:NativeWindow = displayObject.stage.window;
The Stage.window property is only available in desktop players. You can detect whether the current player
supports window instances by checking the System.Capabilities.playerType property.
Content can be added to the stage using normal DisplayObjectContainer APIs such as
addChild().
Important: Adding Flex components directly to the display list of an application-created window is not supported in this Alpha release of Apollo. You can add Flex components to the display list of the initial window automatically created on application start up, but not to the display lists of any windows created by your application logic. You can load a Flex-based SWF into a new window as long as the SWF is loaded into its own ApplicationDomain.
The following operations on NativeWindows are asynchronous: close(), maximize(), minimize(), and restore(). An application can detect when these operations have completed by listening for the appropriate events.
If the shell.autoExit property is true, which is the default, the application will close when it's
last window is closed. If autoExit is false, then the application does not
automatically exit even if all windows have closed.
NativeWindow objects will not be garbage collected after the window constructor has been called and before close()
has been called. It is the responsibility of the application to close its own windows.
true
if the application is running in a desktop player, and false if it is not:
public function isDesktopPlayer():Boolean
{
return (Capabilities.playerType == 'Desktop');
}
See also
| Property | Defined by | ||
|---|---|---|---|
| bounds : Rectangle
The size and location of this window.
| NativeWindow | ||
| closed : Boolean
[read-only]
Indicates whether this window has been closed.
| NativeWindow | ||
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance.
| Object | |
| displayState : String
[read-only]
A string reporting this window's current display state.
| NativeWindow | ||
| height : Number
The height of this window in pixels.
| NativeWindow | ||
| initOptions : NativeWindowInitOptions
[read-only]
The
NativeWindowInitOptions structure used to create this window. | NativeWindow | ||
| maxSize : Point
The maximum size for this window.
| NativeWindow | ||
| minSize : Point
The minimum size for this window.
| NativeWindow | ||
![]() | prototype : Object
[static]
A reference to the prototype object of a class or function object.
| Object | |
| stage : Stage
[read-only]
The
Stage of this window. | NativeWindow | ||
| title : String
The window title.
| NativeWindow | ||
| visible : Boolean
Specifies whether this window is visible.
| NativeWindow | ||
| width : Number
The width of this window in pixels.
| NativeWindow | ||
| x : Number
The x coordinate of this window's top left corner relative to the
upper left corner of the operating system's desktop.
| NativeWindow | ||
| y : Number
The y coordinate of this window's top left corner relative to the
upper left corner of the operating system's desktop.
| NativeWindow | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new NativeWindow instance and a corresponding operating system window.
| NativeWindow | ||
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event.
| EventDispatcher | |
|
close():void
Closes this window.
| NativeWindow | ||
![]() |
Dispatches an event into the event flow.
| EventDispatcher | |
|
Converts a point in pixel coordinates relative to the origin of the window stage
(a global point in terms of the display list), to a point on the virtual desktop.
| NativeWindow | ||
![]() |
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event.
| EventDispatcher | |
|
maximize():void
Maximizes this native window according to system rules and behavior.
| NativeWindow | ||
|
minimize():void
Minimizes this native window according to system rules and behavior.
| NativeWindow | ||
![]() |
Removes a listener from the EventDispatcher object.
| EventDispatcher | |
|
restore():void
Restores this window from either a minimized or a maximized state.
| NativeWindow | ||
![]() |
Sets the availability of a dynamic property for loop operations.
| Object | |
|
startMove():void
Starts a system-controlled move of this window.
| NativeWindow | ||
|
startResize(edgeOrCorner:String):void
Starts a system-controlled resize operation of this window.
| NativeWindow | ||
![]() |
Returns the string representation of the specified object.
| Object | |
![]() |
Returns the primitive value of the specified object.
| Object | |
![]() |
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type.
| EventDispatcher | |
| Event | Summary | Defined by | ||
|---|---|---|---|---|
![]() | Dispatched when Flash Player gains operating system focus and becomes active. | EventDispatcher | ||
| Dispatched by this NativeWindow object after the window has been closed. | NativeWindow | |||
| Dispatched by this NativeWindow object immediately before the window is to be closed. | NativeWindow | |||
![]() | Dispatched when Flash Player loses operating system focus and is becoming inactive. | EventDispatcher | ||
Dispatched by this NativeWindow object after the window's displayState has changed. | NativeWindow | |||
| Dispatched by this NativeWindow object immediately before the window changes displayState. | NativeWindow | |||
| Dispatched by this NativeWindow object after the window has been moved on the desktop. | NativeWindow | |||
| Dispatched by the NativeWindow object immediately before the window is to be moved on the desktop. | NativeWindow | |||
| Dispatched by this NativeWindow object after the window has been resized. | NativeWindow | |||
| Dispatched by this NativeWindow object immediately before the window is to be resized on the desktop. | NativeWindow | |||
| bounds | property |
bounds:Rectangle [read-write]The size and location of this window.
The dimensions of a window include any system chrome. The dimensions of a window's stage are equal to the
dimensions of the window, minus the size of any system chrome. Changing
the width and height of the window will change the stage's stageWidth and stageHeight.
The reverse also applies; changing the stage dimensions will change the window size.
A NativeWindowBoundsChangeEvent "resize" event is dispatched whenever the width or height of this window
changes. Likewise, a "move" event is dispatched whenever the origin (x,y) of this window
changes. Setting the bounds property directly will not dispatch a "moving" or "resizing"
event. To allow other components to prepare for or cancel an impending move or resize operation, your bounds
changing logic can dispatch "moving" and "resizing" events with the NativeWindow.dispatchEvent
method and then check whether the event was cancelled by a registered listener.
Setting the bounds property of a window is equivalent to setting its x, y,
width, and height properties (and vice-versa).
If the width and the height specified are less than the minimum or greater than the maximum allowed size, either because of the minSize and maxSize properties of the window, or the minimum and maximum operating system limits, then the window dimensions are set to the closest legal size.
Implementation public function get bounds():Rectangle
public function set bounds(value:Rectangle):void
ArgumentError — if the rectangle is null or contains invalid values.
|
|
Error — if the bounds property is accessed after the window has been closed.
|
See also
public function setBounds(newBounds:Rectangle):void{
var resizingEvent:NativeWindowBoundsEvent =
new NativeWindowBoundsEvent(NativeWindowBoundsEvent.RESIZING,true,true);
//"this" must be a reference to the window being changed
this.dispatchEvent(resizingEvent);
if(!resizingEvent.isDefaultPrevented()){
this.bounds = newBounds.clone();
}
}
| closed | property |
closed:Boolean [read-only]Indicates whether this window has been closed.
Accessing the following properties on a closed window will
throw an IllegalOperationError:
Likewise, calling the following methods on a closed window will
also throw an IllegalOperationError:
public function get closed():Boolean
| displayState | property |
displayState:String [read-only]A string reporting this window's current display state.
Constants for the possible values are defined in the NativeWindowDisplayState class:
NativeWindowDisplayState.NORMALNativeWindowDisplayState.MINIMIZEDNativeWindowDisplayState.MAXIMIZED public function get displayState():String
IllegalOperationError — if the displayState is read after the window has been closed.
|
See also
| height | property |
height:Number [read-write]The height of this window in pixels.
The dimensions of a window include any system window chrome that is displayed.
The height of the usable display area inside a window is available from the
Stage.stageHeight property.
Changing the height property of a window is equivalent to changing the
height through the bounds property.
If the height specified is less than the minimum or greater than the maximum allowed height, either because of the minSize and maxSize properties of the window, or the minimum and maximum operating system limits, then the window height is set to the closest legal size.
Implementation public function get height():Number
public function set height(value:Number):void
ArgumentError — if the value set is null or invalid.
|
|
IllegalOperationError — if the property is accessed after the window has been closed.
|
See also
| initOptions | property |
initOptions:NativeWindowInitOptions [read-only]
The NativeWindowInitOptions structure used to create this window.
public function get initOptions():NativeWindowInitOptions
See also
| maxSize | property |
maxSize:Point [read-write]The maximum size for this window.
The size limit is specified as the coordinates of a Point object.
Point.x corresponds to the window width; Point.y to the window
height.
maxSize is passed to the operating system and is enforced for window resizing operations
invoked both through ActionScript and through the operating system.
Note: Maximizing a window will only enlarge the window to the maxSize value even if
the maximized window will be smaller than the operating system screen. The window will still be
in the maximized display state.
public function get maxSize():Point
public function set maxSize(value:Point):void
IllegalOperationError — if size is not within the operating system minimum and maximum window sizes.
|
|
SecurityError — if size is forbidden for the content's current privilege.
|
See also
| minSize | property |
minSize:Point [read-write]The minimum size for this window.
The size limit is specified as the coordinates of a Point object.
Point.x corresponds to the window width; Point.y to the window
height.
minSize is passed to the operating system and is enforced for window resizing operations
invoked both through ActionScript and through the operating system.
public function get minSize():Point
public function set minSize(value:Point):void
IllegalOperationError — if size is not within the operating system minimum and maximum window sizes.
|
|
SecurityError — if size is forbidden for the content's current privilege.
|
See also
| stage | property |
stage:Stage [read-only]
The Stage of this window.
The stage is the root of the display list for the window. Add visual objects to a window by adding them to the stage or to another object already in the display list of this stage. The stage dimensions are that of the window client area when the window uses system chrome. The stage dimensions are equal to the dimensions of the window if system chrome is not used.
Implementation public function get stage():Stage
See also
| title | property |
title:String [read-write]The window title.
The title will appear in the system chrome for the window, if displayed, as well as in other system-dependent locations (such as the task bar).
Implementation public function get title():String
public function set title(value:String):void
IllegalOperationError — if the property is accessed after the window has been closed.
|
| visible | property |
visible:Boolean [read-write]Specifies whether this window is visible.
An invisible window is not displayed on the desktop, but all window properties and methods are valid.
By default, visible is set to true. To create a window in an invisible state,
set the visible parameter passed to the window constructor to false.
public function get visible():Boolean
public function set visible(value:Boolean):void
SecurityError — When trying to set to false without sufficient privilege.
|
|
IllegalOperationError — if the property is accessed after the window has been closed.
|
| width | property |
width:Number [read-write]The width of this window in pixels.
The dimensions of a NativeWindow include any system window chrome that is displayed.
The width of the usable display area inside a window is available from the
Stage.stageWidth property.
Changing the width property of a window is equivalent to changing the
width through the bounds property.
If the width specified is less than the minimum or greater than the maximum allowed width, either because of the minSize and maxSize properties of the window, or the minimum and maximum operating system limits, then the window width is set to the closest legal size.
Implementation public function get width():Number
public function set width(value:Number):void
ArgumentError — if the value set is null or invalid.
|
|
IllegalOperationError — if the property is accessed after the window has been closed.
|
See also
| x | property |
x:Number [read-write]The x coordinate of this window's top left corner relative to the upper left corner of the operating system's desktop.
Changing the x property of a window is equivalent to changing the
location through the bounds property.
public function get x():Number
public function set x(value:Number):void
ArgumentError — if the value set is null or invalid.
|
|
IllegalOperationError — if the property is accessed after the window has been closed.
|
See also
| y | property |
y:Number [read-write]The y coordinate of this window's top left corner relative to the upper left corner of the operating system's desktop.
Changing the y property of a window is equivalent to changing the
location through the bounds property.
public function get y():Number
public function set y(value:Number):void
ArgumentError — if the value set is null or invalid.
|
|
IllegalOperationError — if the property is accessed after the window has been closed.
|
See also
| NativeWindow | () | constructor |
public function NativeWindow(visible:Boolean, initOptions:NativeWindowInitOptions)Creates a new NativeWindow instance and a corresponding operating system window.
The settings defined in the initOptions parameter cannot be changed after the
window is created. Entirely invalid initOptions will cause an IllegalOperationError
to be thrown. Settings that are valid but not available on the current system will not throw an exception.
These cases can be detected, if desired, using NativeWindowCapabilities.
visible:Boolean — If true, the window will be visible on creation. Otherwise,
the application must set the window's visible property for the window to be displayed.
|
|
initOptions:NativeWindowInitOptions — An object containing the initialization properties for the window.
|
IllegalOperationError — If the initOptions parameter is invalid.
|
See also
| close | () | method |
public function close():voidCloses this window.
A "close" event is dispatched as soon as the close operation is complete. A "closing" event will not be dispatched. If cancellation of the close operation should be allowed, dispatch a closing event and check whether any registered listeners cancel the default behavior before calling the close method.
If DisplayObject instances that are currently in the window are not referenced elsewhere they will be garbage collected and destroyed.
After being closed, the NativeWindow object is still a valid reference, but accessing most properties and methods will throw an ''IllegalOperationError''.
Closed windows cannot be reopened. If the window is already closed, no action is taken and no events are dispatched.
Note: to hide a window temporarily, set the window's visible property to
false.
See also
public function closeCommand():Boolean{
var closeEvent:Event = new Event(Event.CLOSING,true,true);
dispatchEvent(closeEvent);
if(!closeEvent.isDefaultPrevented()){
nativeWin.close();
return true;
} else {
return false;
}
}
| globalToScreen | () | method |
public function globalToScreen(globalPoint:Point):PointConverts a point in pixel coordinates relative to the origin of the window stage (a global point in terms of the display list), to a point on the virtual desktop.
Virtual desktop coordinates are relative to the upper, lefthand corner of the primary monitor.
ParametersglobalPoint:Point — The point on the stage to convert to a point on the screen.
|
Point —
The specified global point relative to the screen.
|
| maximize | () | method |
public function maximize():voidMaximizes this native window according to system rules and behavior.
Calling maximize() dispatches a displayStateChange event, and, if applicable, a move
and a resize event. Wheras system chrome will dispatch a displayStateChanging event that can be canceled
when a maximize command is initiated by a user, your maximize logic must implement this behavior, if desired.
maximize() executes asynchronously. To detect the completion of the state change, listen for
the "displayStateChange" event.
If the window is already maximized, no action is taken and no events are dispatched.
IllegalOperationError — if the maximizable property of the window
initOptions is false or
if the method is called after the window has been closed.
|
See also
public function maximizeCommand():Boolean{
var beforeState:String = this.displayState;
var afterState:String = NativeWindowDisplayState.MAXIMIZED;
var displayStateChangingEvent:NativeWindowDisplayStateEvent =
new NativeWindowDisplayStateEvent(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING,
true,true,beforeState,afterState);
dispatchEvent(displayStateChangingEvent);
if(!displayStateChangingEvent.isDefaultPrevented()){
nativeWin.maximize();
return true;
} else {
return false;
}
}
| minimize | () | method |
public function minimize():voidMinimizes this native window according to system rules and behavior.
Calling minimize() dispatches a displayStateChange event, and, if applicable, a move
and a resize event. Wheras system chrome will dispatch a displayStateChanging event that can be canceled
when a minimize command is initiated by a user, your minimize logic must implement this behavior, if desired.
minimize() executes asynchronously. To detect the completion of the state change, listen for
the "displayStateChange" event.
If the window is already minimized, no action is taken and no events are dispatched.
IllegalOperationError — if the minimizable property of the window
initOptions is false or
if the method is called after the window has been closed.
|
See also
public function minimizeCommand():Boolean{
var beforeState:String = this.displayState;
var afterState:String = NativeWindowDisplayState.NORMAL;
var displayStateChangingEvent:NativeWindowDisplayStateEvent =
new NativeWindowDisplayStateEvent(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING,
true,true,beforeState,afterState);
dispatchEvent(displayStateChangingEvent);
if(!displayStateChangingEvent.isDefaultPrevented()){
nativeWin.minimize();
return true;
} else {
return false;
}
}
| restore | () | method |
public function restore():voidRestores this window from either a minimized or a maximized state.
Calling restore() dispatches a displayStateChange event, and, if applicable, a move
and a resize event. Wheras system chrome will dispatch a displayStateChanging event that can be canceled
when a restore command is initiated by a user, your restore logic must implement this behavior, if desired.
restore() executes asynchronously. To detect the completion of the state change, listen for
the "displayStateChange" event.
If the window is already in the NativeWindowDisplayState.NORMAL state, no action is taken and no events
are dispatched.
IllegalOperationError — if the method is called after the window has been closed.
|
See also
public function restoreCommand():Boolean{
var beforeState:String = this.displayState;
var afterState:String = NativeWindowDisplayState.NORMAL;
var displayStateChangingEvent:NativeWindowDisplayStateEvent =
new NativeWindowDisplayStateEvent(NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING,
true,true,beforeState,afterState);
dispatchEvent(displayStateChangingEvent);
if(!displayStateChangingEvent.isDefaultPrevented()){
nativeWin.restore();
return true;
} else {
return false;
}
}
| startMove | () | method |
public function startMove():voidStarts a system-controlled move of this window.
When called from a mouseDown event, this method begins a mouse-driven move
sequence that continues until a mouseUp event occurs.
When called from other code this method begins a keyboard- or mouse-driven move sequence consistent with the operating system's default sequence.
During the move sequence, a series of events will be dispatched as the window origin moves. For each incremental move, first a moving event is dispatched and then, if the moving event is not canceled, the window location is updated and a move event is dispatched. If a moving event is canceled, the move sequence is immediately terminated.
IllegalOperationError — if the method is called after the window has been closed.
|
| startResize | () | method |
public function startResize(edgeOrCorner:String):voidStarts a system-controlled resize operation of this window.
When called from a mouseDown event handler this method begins a mouse-driven resizing
sequence that continues until a mouseUp event occurs.
When called from other code this method begins a keyboard- or mouse-driven resizing sequence consistent with the operating system's default sequence.
During the resize sequence, a series of events will be dispatched as the window dimensions change. For each incremental change, first a resizing event is dispatched and then, if the resizing event is not canceled, the window dimensions are updated and a resize event is dispatched. If a resizing event is canceled, the the sequence is immediately terminated.
ParametersedgeOrCorner:String — A constant from the NativeWindowResize class that specifies
which edge or corner of the window to resize. The following are
valid values:
|
IllegalOperationError — if the method is called after the window has been closed.
|
| close | event |
flash.events.Event
flash.events.Event.CLOSE
Dispatched by this NativeWindow object after the window has been closed.
Defines the value of the type property of a close event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The object whose connection has been closed. |
| closing | event |
flash.events.Event
flash.events.Event.CLOSING
Dispatched by this NativeWindow object immediately before the window is to be closed. This event can be cancelled to prevent the window from being closed.
Defines the value of the type property of a closing event object.
This event has the following properties:
| Property | Value |
|---|---|
bubbles | false |
cancelable | true; canceling this event object stops the close operation. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The object whose connection is to be closed. |
function closing_handler(closingEvent:Event):void
{
if (document.isDirty)
{
closingEvent.preventDefault();
// raise save dialog...
}
}
| displayStateChange | event |
flash.events.NativeWindowDisplayStateEvent
flash.events.NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGE
Dispatched by this NativeWindow object after the window's displayState has changed.
Defines the value of the type property of a displayStateChange event object.
This event has the following properties:
| Properties | Values |
|---|---|
afterState | the old display state of the window. |
beforeState | the new display state of the window. |
target | The NativeWindow that has just changed state. |
bubbles | No. |
currentTarget | Indicates the object that is actively processing the Event object with an event listener. |
cancelable | false; There is no default behavior to cancel. |
| displayStateChanging | event |
flash.events.NativeWindowDisplayStateEvent
flash.events.NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING
Dispatched by this NativeWindow object immediately before the window changes displayState. This event can be cancelled to prevent the change.
Defines the value of the type property of a displayStateChanging event object.
This event has the following properties:
| Properties | Values |
|---|---|
afterState | the display state of the window before the pending change. |
beforeState | the display state of the window after the pending change. |
target | The NativeWindow that has just changed state. |
bubbles | No. |
currentTarget | Indicates the object that is actively processing the Event object with an event listener. |
cancelable | true; cancelling the event will prevent the change. |
function displayStateChanging_handler(displayStateEvent:NativeWindowDisplayStateEvent):void
{
//shouldStopStateChange is an application-defined Boolean indicating that display state changes should be canceled
if (displayStateEvent.type == NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING && shouldStopStateChange)
{
displayStateEvent.preventDefault();
}
}
| move | event |
flash.events.NativeWindowBoundsEvent
flash.events.NativeWindowBoundsEvent.MOVE
Dispatched by this NativeWindow object after the window has been moved on the desktop.
A move event is dispatched whenever the origin (x or y properties) of the window
changes, which can occur because of a system-controlled window move; minimizing, maximizing,
or restoring the window; or changing the window location by setting the x,
y, or bounds properties.
Defines the value of the type property of a move event object.
This event has the following properties:
| Properties | Values |
|---|---|
afterBounds | the new bounds of the window. |
beforeBounds | the old bounds of the window. |
target | The NativeWindow that has just changed state. |
bubbles | No. |
currentTarget | Indicates the object that is actively processing the Event object with an event listener. |
cancelable | false; There is no default behavior to cancel. |
| moving | event |
flash.events.NativeWindowBoundsEvent
flash.events.NativeWindowBoundsEvent.MOVING
Dispatched by the NativeWindow object immediately before the window is to be moved on the desktop. This event can be cancelled to prevent or modify the move.
Defines the value of the type property of a moving event object.
This event has the following properties:
| Properties | Values |
|---|---|
afterBounds | the bounds of the window after the pending change. |
beforeBounds | the bounds of the window before the pending change. |
bubbles | No. |
cancelable | true; cancelling the event will prevent the window move. |
currentTarget | Indicates the object that is actively processing the Event object with an event listener. |
target | The NativeWindow that has just changed state. |
| resize | event |
flash.events.NativeWindowBoundsEvent
flash.events.NativeWindowBoundsEvent.RESIZE
Dispatched by this NativeWindow object after the window has been resized.
A resize event is dispatched whenever the size (width or height properties) of the window
changes, which can occur because of a system-controlled window resize; minimizing, maximizing,
or restoring the window; or changing the window size by setting the width,
height, or bounds properties.
NativeWindow "resize" events are dispatched during system-controled resize loops. In contrast,
Stage object "resize" events are dispatched when the Stage is ready for drawing.
Defines the value of the type property of a resize event object.
This event has the following properties:
| Properties | Values |
|---|---|
afterBounds | the new bounds of the window. |
beforeBounds | the old bounds of the window. |
target | The NativeWindow that has just changed state. |
bubbles | No. |
currentTarget | Indicates the object that is actively processing the Event object with an event listener. |
cancelable | false; There is no default behavior to cancel. |
See also
| resizing | event |
flash.events.NativeWindowBoundsEvent
flash.events.NativeWindowBoundsEvent.RESIZING
Dispatched by this NativeWindow object immediately before the window is to be resized on the desktop. This event can be canceled to prevent or modify the resize.
Defines the value of the type property of a resizing event object.
This event has the following properties:
| Properties | Values |
|---|---|
afterBounds | the bounds of the window after the pending change. |
beforeBounds | the bounds of the window before the pending change. |
target | The NativeWindow that has just changed state. |
bubbles | No. |
currentTarget | Indicates the object that is actively processing the Event object with an event listener. |
cancelable | true; cancelling the event will prevent the window move. |
function boundsChanging_handler(boundsEvent:NativeWindowBoundsEvent):void
{
//shouldStopResize is an application-defined Boolean indicating that resize operations should be canceled
if (boundsEvent.type == NativeWindowBoundsEvent.RESIZING && shouldStopResize)
{
boundsEvent.preventDefault();
}
}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/apollo/1.0/aslr/flash/display/NativeWindow.html