The Lib.Media.Display.stage object represents the main drawing area.

For content running on desktop operating systems, each NativeWindow object has a corresponding Stage object.

The Stage object has several ancestor classes - DisplayObjectContainer, InteractiveObject, DisplayObject, and EventDispatcher - from which it inherits properties and methods. Stage not available in Threads and Web.

You can send Stage object to Thread but it is not recommended as drawing/rendering functions are not thread safe.


Inherited from -> DisplayObjectContainer -> InteractiveObject -> DisplayObject -> EventDispatcher


Stage available from static Lib.Media.Display.stage property.


Stage has few properties:

stageWidth

Specifies the current width, in pixels, of the Stage.

read-only, Int

stageHeight

The current height, in pixels, of the Stage.

read-only, Int

frameRate

Gets and sets the frame rate of the stage. The frame rate is defined as frames per second. By default the rate is set to the 60. Valid range for the main window frame rate is from 12 to 1000 frames per second. Any new(secondary) window created from main has no frame rate limit.

Note: An application might not be able to follow high frame rate settings, either because the target platform is not fast enough or the player is synchronized to the vertical blank timing of the display device (usually 60 Hz on LCD devices). In some cases, a target platform might also choose to lower the maximum frame rate if it anticipates high CPU usage.

For content, setting the frameRate property of one Stage object changes the frame rate for all Stage objects (used by different NativeWindow objects).

float

color

background color


softKeyboardRect

The area of the stage that is currently covered by the software keyboard.

The area has a size of zero(0,0,0,0) when the soft keyboard is not visible.

When the keyboard opens, the softKeyboardRect is set at the time the softKeyboardActivate event is dispatched. If the keyboard changes size while open, the runtime updates the softKeyboardRect property and dispatches an additional softKeyboardActivate event.

read-only. Only android and iOS.

stage3Ds

Returns vector array of Stage3D objects.


stageVideos

Returns vector array of StageVideo objects.

Only android and iOS.

window

Returns stage inner window object for changing it size, position and title on desktop targets.

Window object


methods:

getOrientation()

return mobile device orientation index.

Int


events:

Lib.Media.Events.Event.BEFORE_CLOSE

Before close event for secondary window object. Event can prevent window from closing by using stopPropagation method.

Lib.Media.Events.Event.CLOSE

Close event for secondary window object

Created with the Personal Edition of HelpNDoc: Full-featured EPub generator