Holds basic information about an event.

For many events, such as the events represented by the Event class constants, this basic information is sufficient. Other events, however, may require more detailed information. Events associated with a mouse click, for example, need to include additional information about the location of the click event and whether any keys were pressed during the click event. You can pass such additional information to event listeners by extending the Event class, which is what the MouseEvent class does.

The methods of the Event class can be used in event listener functions to affect the behavior of the event object. You can make the current event listener the last one to process an event by calling the stopPropagation or stopImmediatePropagation method.

Implemented by

Constants

ADDED → String

"added"
ADDED_TO_STAGE → String

"addedToStage"
CANCEL → String

"cancel"
CHANGE → String

"change"
CLOSE → String

"close"
COMPLETE → String

"complete"
CONFIRM → String

"confirm"
ENTER_FRAME → String

"enterFrame"
EXIT_FRAME → String

"exitFrame"
MOUSE_LEAVE → String

"mouseLeave"
OKAY → String

"okay"
OPEN → String

"open"
PROGRESS → String

"progress"
REMOVED → String

"removed"
REMOVED_FROM_STAGE → String

"removedFromStage"
RENDER → String

"render"
RESIZE → String

"resize"
SCROLL → String

"scroll"
SELECT → String

"select"

Constructors

Event(String type, [ bool bubbles = false ])

Creates an Event of specified type.

Properties

bubbles → bool

Indicates whether an event is a bubbling event. If the event can bubble, this value is true; otherwise it is false.

read-only
captures → bool

Indicates whether an event is a capturing event.

read-only
currentTarget EventDispatcher

The object that is actively processing the Event object with an event listener.

read-only
eventPhase EventPhase

The current phase in the event flow.

read-only
hashCode → int

Get a hash code for this object.

read-only, inherited
isImmediatePropagationStopped → bool

Indicates if the propagation of this event has been stopped.

read-only
isPropagationStopped → bool

Indicates if the propagation of this event has been stopped.

read-only
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited
target EventDispatcher

The event target.

read-only
type → String

The type of event.

read-only

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
stopImmediatePropagation() → void

Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow.

stopPropagation() → void

Prevents processing of any event listeners in nodes subsequent to the current node in the event flow.

toString() → String

Returns a string representation of this object.

inherited