Class: Stage

graphics.display. Stage


new Stage()

Get the stage informations.

Get the stage informations.

Members


<readonly> allowFullScreen :boolean

Get if the stage allow fullScreen

Type:
  • boolean

<readonly> allowFullScreenInteractive :boolean

Get if the stage allow fullScreen with text input

Type:
  • boolean

<readonly> aspectRatio

Get the stage aspect ratio


displayState

A value from the StageDisplayState enumeration that specifies which display state to use.

The following are valid values:

  • StageDisplayState.FULL_SCREEN Sets application or content to expand the stage over the user's entire screen. Keyboard input is disabled, with the exception of a limited set of non-printing keys.
  • StageDisplayState.FULL_SCREEN_INTERACTIVE Sets the application to expand the stage over the user's entire screen, with keyboard input allowed.
  • StageDisplayState.NORMAL Sets the stage back to the standard stage display mode.


<constant> fullScreen :system.signals.Signal

This signal emit when fullscreen state is changed.

Type:

<readonly> fullScreenHeight

Indicates the fullScreen height of the stage.


<readonly> fullScreenWidth

Indicates the fullScreen width of the stage.


<readonly> height

Indicates the height value of the stage.


<readonly> launchedFromHomeScreen :boolean

Indicates if app is launched from the Home Screen.

Type:
  • boolean

<readonly> orientation

Indicates the orientation of the stage.


<constant> orientationChange :system.signals.Signal

This signal emit when the orientation is changed.

Type:

<readonly> pixelRatio

Indicates the pixelRatio of the stage.


<constant> resize :system.signals.Signal

This signal emit when the stage is resized.

Type:

width

Indicates the width value of the stage.

Methods


getDeviceOrientation()

Get orientation of the current screen window.


getViewportSize()

Get viewport size of the current browser window. This command only works on desktop browser or in a mobile environment with a webview enabled.


notifyFullScreen()

Notify when the stage change state to fullscreen or normal.


notifyOrientationChange()

Notify when the orientation is changed.


notifyResized()

Notify when the stage is resized.