GameControllerEvent

public class
loom2d.events.GameControllerEvent

Description

A GameControllerEvent is dispatched in response to connecting or disconnecting a game controller.

To be notified of game controller events, add an event listener to the stage. Children of the stage won't be notified of game controller input.

See also:
loom2d.display.Stage

API overview

Constructor

GameControllerEvent ( type: String , controllerID: Number = 0 )
Creates a new GameControllerEvent

Attributes

Public attributes

controllerID: Number read-only

Contains the ID of controller

Constants

Constants

CONTROLLER_ADDED: String static

Event type for a game controller being connected

CONTROLLER_REMOVED: String static

Event type for a game controller being disconnected

Functions

Public functions

Constructor

GameControllerEvent ( type: String , controllerID: Number = 0 )

Creates a new GameControllerEvent.

Attributes

bubbles: Boolean
Inherited from Event

read-only

Indicates if event will bubble.

controllerID: Number

read-only

Contains the ID of controller.

currentTarget: EventDispatcher
Inherited from Event

read-only

The object the event is currently bubbling at.

data: Object
Inherited from Event

read-only

Arbitrary data that is attached to the event.

target: EventDispatcher
Inherited from Event

read-only

The object that dispatched the event.

type: String
Inherited from Event

read-only

A string that identifies the event.

Constants

ADDED: String

static

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

ADDED_TO_STAGE: String

static

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

CANCEL: String

static

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

CHANGE: String

static

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

CLOSE: String

static

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

COMPLETE: String

static

Event type that may be used whenever something finishes.

CONTEXT3D_CREATE: String

static

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

CONTROLLER_ADDED: String

static

Event type for a game controller being connected.

CONTROLLER_REMOVED: String

static

Event type for a game controller being disconnected.

ENTER_FRAME: String

static

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

FLATTEN: String

static

Event type for a display object that is being flattened.

OPEN: String

static

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

REMOVED: String

static

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

REMOVED_FROM_STAGE: String

static

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

REMOVE_FROM_JUGGLER: String

static

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

RESIZE: String

static

Event type for a resized Flash Player.

ROOT_CREATED: String

static

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

SCROLL: String

static

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

SELECT: String

static

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

TRIGGERED: String

static

Event type for a triggered button.

Functions

clone (): Event
Inherited from Event

Clones the event object with the same arguments and returns the duplicate.


Returns

Event The duplicate event object that was cloned.

getFullTypeName (): String
Inherited from Object

native

Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.


Returns

String fully qualified type name of the Object.

getType (): Type
Inherited from Object

native

Gets the Type that describes the Object.


Returns

Type The Type that describes the object.

getTypeName (): String
Inherited from Object

native

Gets the type name of the Object.


Returns

String type name of the Object.

stopImmediatePropagation (): Void
Inherited from Event

Prevents any other listeners from receiving the event.



stopPropagation (): Void
Inherited from Event

Prevents listeners at the next bubble stage from receiving the event.



toString (): String
Inherited from Object

native

Returns a String that describes the Object. This can be overriden to provide extra details when printing objects using trace().


Returns

String String that described the Object.

: