Event objects are passed as parameters to event listeners when an event occurs. This is Starling's version of the Flash Event class.

EventDispatchers create instances of this class and send them to registered listeners. An event object contains information that characterizes an event, most importantly the event type and if the event bubbles. The target of an event is the object that dispatched it.

For some event types, this information is sufficient; other events may need additional information to be carried to the listener. In that case, you can subclass "Event" and add properties with all the information you require. The "EnterFrameEvent" is an example for this practice; it adds a property about the time that has passed since the last frame.

Furthermore, the event class contains methods that can stop the event from being processed by other listeners - either completely or at the next bubble stage.

@see EventDispatcher

### Hierarchy

- Event
  - EnterFrameEvent
  - TouchEvent
  - KeyboardEvent
  - ResizeEvent

## Index

### Constructors

- constructor

### Properties

- bubbles
- currentTarget
- data
- target
- type
- ADDED
- ADDED_TO_STAGE
- CANCEL
- CHANGE
- CLOSE
- COMPLETE
- CONTEXT3D_CREATE
- ENTER_FRAME
- FATAL_ERROR
- IO_ERROR
- OPEN
- PARSE_ERROR
- READY
- REMOVED
- REMOVED_FROM_STAGE
- REMOVE_FROM_JUGGLER
- RENDER
- RESIZE
- ROOT_CREATED
- SCROLL
- SECURITY_ERROR
- SELECT
- TEXTURES_RESTORED
- TRIGGERED
- UPDATE

### Methods

- stopImmediatePropagation
- stopPropagation
- toString

## Constructors

### constructor

- new Event(type: string, bubbles?: boolean, data?: any): Event

- - Defined in lib/starling/events/Event.d.ts:79

  Creates an event object that can be passed to listeners.

  #### Parameters

  - ##### type: string

  - ##### Optional bubbles: boolean

  - ##### Optional data: any

  #### Returns Event

## Properties

### bubbles

bubbles: boolean

- Defined in lib/starling/events/Event.d.ts:94

Indicates if event will bubble.

### currentTarget

currentTarget: EventDispatcher

- Defined in lib/starling/events/Event.d.ts:100

The object the event is currently bubbling at.

### data

data: any

- Defined in lib/starling/events/Event.d.ts:106

Arbitrary data that is attached to the event.

### target

target: EventDispatcher

- Defined in lib/starling/events/Event.d.ts:97

The object that dispatched the event.

### type

type: string

- Defined in lib/starling/events/Event.d.ts:103

A string that identifies the event.

### Static ADDED

ADDED: string

- Defined in lib/starling/events/Event.d.ts:28

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

### Static ADDED_TO_STAGE

ADDED_TO_STAGE: string

- Defined in lib/starling/events/Event.d.ts:30

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

### Static CANCEL

CANCEL: string

- Defined in lib/starling/events/Event.d.ts:67

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

### Static CHANGE

CHANGE: string

- Defined in lib/starling/events/Event.d.ts:65

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

### Static CLOSE

CLOSE: string

- Defined in lib/starling/events/Event.d.ts:73

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

### Static COMPLETE

COMPLETE: string

- Defined in lib/starling/events/Event.d.ts:42

Event type that may be used whenever something finishes.

### Static CONTEXT3D_CREATE

CONTEXT3D_CREATE: string

- Defined in lib/starling/events/Event.d.ts:44

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

### Static ENTER_FRAME

ENTER_FRAME: string

- Defined in lib/starling/events/Event.d.ts:32

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

### Static FATAL_ERROR

FATAL_ERROR: string

- Defined in lib/starling/events/Event.d.ts:62

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

- Defined in lib/starling/events/Event.d.ts:54

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

### Static OPEN

OPEN: string

- Defined in lib/starling/events/Event.d.ts:71

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

### Static PARSE_ERROR

PARSE_ERROR: string

- Defined in lib/starling/events/Event.d.ts:59

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

### Static READY

READY: string

- Defined in lib/starling/events/Event.d.ts:77

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

### Static REMOVED

REMOVED: string

- Defined in lib/starling/events/Event.d.ts:34

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

### Static REMOVED_FROM_STAGE

REMOVED_FROM_STAGE: string

- Defined in lib/starling/events/Event.d.ts:36

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

### Static REMOVE_FROM_JUGGLER

REMOVE_FROM_JUGGLER: string

- Defined in lib/starling/events/Event.d.ts:50

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

### Static RENDER

RENDER: string

- Defined in lib/starling/events/Event.d.ts:46

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

### Static RESIZE

RESIZE: string

- Defined in lib/starling/events/Event.d.ts:40

Event type for a resized Flash Player.

### Static ROOT_CREATED

ROOT_CREATED: string

- Defined in lib/starling/events/Event.d.ts:48

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

### Static SCROLL

SCROLL: string

- Defined in lib/starling/events/Event.d.ts:69

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

### Static SECURITY_ERROR

SECURITY_ERROR: string

- Defined in lib/starling/events/Event.d.ts:56

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

### Static SELECT

SELECT: string

- Defined in lib/starling/events/Event.d.ts:75

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

### Static TEXTURES_RESTORED

TEXTURES_RESTORED: string

- Defined in lib/starling/events/Event.d.ts:52

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

### Static TRIGGERED

TRIGGERED: string

- Defined in lib/starling/events/Event.d.ts:38

Event type for a triggered button.

### Static UPDATE

UPDATE: string

- Defined in lib/starling/events/Event.d.ts:79

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

## Methods

### stopImmediatePropagation

- stopImmediatePropagation(): void

- - Defined in lib/starling/events/Event.d.ts:88

  Prevents any other listeners from receiving the event.

  #### Returns void

### stopPropagation

- stopPropagation(): void

- - Defined in lib/starling/events/Event.d.ts:85

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

  #### Returns void

### toString

- toString(): string

- - Defined in lib/starling/events/Event.d.ts:91

  Returns a description of the event, containing type and bubble information.

  #### Returns string

Generated using TypeDoc