Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ResizeEvent

A ResizeEvent is dispatched by the stage when the size of the Flash container changes. Use it to update the Starling viewport and the stage size.

The event contains properties containing the updated width and height of the Flash player. If you want to scale the contents of your stage to fill the screen, update the Starling.current.viewPort rectangle accordingly. If you want to make use of the additional screen estate, update the values of stage.stageWidth and stage.stageHeight as well.

@see starling.display.Stage @see starling.core.Starling

Hierarchy

Index

Constructors

constructor

  • new ResizeEvent(type: string, width: number, height: number, bubbles?: boolean): ResizeEvent

Properties

bubbles

bubbles: boolean

Indicates if event will bubble.

currentTarget

currentTarget: EventDispatcher

The object the event is currently bubbling at.

data

data: any

Arbitrary data that is attached to the event.

height

height: number

The updated height of the player.

target

The object that dispatched the event.

type

type: string

A string that identifies the event.

width

width: number

The updated width of the player.

Static ADDED

ADDED: string

Event type for a display object that is added to a parent.

Static ADDED_TO_STAGE

ADDED_TO_STAGE: string

Event type for a display object that is added to the stage

Static CANCEL

CANCEL: string

An event type to be utilized in custom events. Not used by Starling right now.

Static CHANGE

CHANGE: string

An event type to be utilized in custom events. Not used by Starling right now.

Static CLOSE

CLOSE: string

An event type to be utilized in custom events. Not used by Starling right now.

Static COMPLETE

COMPLETE: string

Event type that may be used whenever something finishes.

Static CONTEXT3D_CREATE

CONTEXT3D_CREATE: string

Event type for a (re)created stage3D rendering context.

Static ENTER_FRAME

ENTER_FRAME: string

Event type for a display object that is entering a new frame.

Static FATAL_ERROR

FATAL_ERROR: string

Event type that is dispatched by the Starling instance when it encounters a problem from which it cannot recover, e.g. a lost device context.

Static IO_ERROR

IO_ERROR: string

Event type that is dispatched by the AssetManager when a file/url cannot be loaded.

Static OPEN

OPEN: string

An event type to be utilized in custom events. Not used by Starling right now.

Static PARSE_ERROR

PARSE_ERROR: string

Event type that is dispatched by the AssetManager when an xml or json file couldn't be parsed.

Static READY

READY: string

An event type to be utilized in custom events. Not used by Starling right now.

Static REMOVED

REMOVED: string

Event type for a display object that is removed from its parent.

Static REMOVED_FROM_STAGE

REMOVED_FROM_STAGE: string

Event type for a display object that is removed from the stage.

Static REMOVE_FROM_JUGGLER

REMOVE_FROM_JUGGLER: string

Event type for an animated object that requests to be removed from the juggler.

Static RENDER

RENDER: string

Event type that is dispatched by the Starling instance directly before rendering.

Static RESIZE

RESIZE: string

Event type for a resized Flash player.

Static ROOT_CREATED

ROOT_CREATED: string

Event type that indicates that the root DisplayObject has been created.

Static SCROLL

SCROLL: string

An event type to be utilized in custom events. Not used by Starling right now.

Static SECURITY_ERROR

SECURITY_ERROR: string

Event type that is dispatched by the AssetManager when a file/url cannot be loaded.

Static SELECT

SELECT: string

An event type to be utilized in custom events. Not used by Starling right now.

Static TEXTURES_RESTORED

TEXTURES_RESTORED: string

Event type that is dispatched by the AssetManager after a context loss.

Static TRIGGERED

TRIGGERED: string

Event type for a triggered button.

Static UPDATE

UPDATE: string

An event type to be utilized in custom events. Not used by Starling right now.

Methods

Protected get_height

  • get_height(): number

Protected get_width

  • get_width(): number

stopImmediatePropagation

  • stopImmediatePropagation(): void

stopPropagation

  • stopPropagation(): void

toString

  • toString(): string

Generated using TypeDoc