The TouchEvent class lets you handle events on devices that detect user contact with the device (such as a finger on a touch screen).

You have to opt-in for touch events by setting the InputEventMode to TouchOnly or MouseAndTouch in the stage options like this:

StageXL.stageOptions.inputEventMode = InputEventMode.MouseAndTouch;
Inheritance

Constants

TOUCH_BEGIN → String

"touchBegin"
TOUCH_CANCEL → String

"touchCancel"
TOUCH_END → String

"touchEnd"
TOUCH_MOVE → String

"touchMove"
TOUCH_OUT → String

"touchOut"
TOUCH_OVER → String

"touchOver"
TOUCH_ROLL_OUT → String

"touchRollOut"
TOUCH_ROLL_OVER → String

"touchRollOver"
TOUCH_TAP → String

"touchTap"

Constructors

TouchEvent(String type, bool bubbles, num localX, num localY, num stageX, num stageY, bool altKey, bool ctrlKey, bool shiftKey, int touchPointID, bool isPrimaryTouchPoint)

Creates a new TouchEvent.

Properties

altKey → bool

Indicates whether the Alt key is active (true) or inactive (false).

read-only, inherited
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, inherited
captures → bool

Indicates whether an event is a capturing event.

read-only, inherited
ctrlKey → bool

Indicates whether the Ctrl key is active (true) or inactive (false).

read-only, inherited
currentTarget EventDispatcher

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

read-only, inherited
eventPhase EventPhase

The current phase in the event flow.

read-only, inherited
hashCode → int

Get a hash code for this object.

read-only, inherited
isDefaultPrevented → bool

read-only, inherited
isImmediatePropagationStopped → bool

Indicates if the propagation of this event has been stopped.

read-only, inherited
isPrimaryTouchPoint → bool

Indicates whether the first point of contact is mapped to mouse events.

read-only
isPropagationStopped → bool

Indicates if the propagation of this event has been stopped.

read-only, inherited
localX → num

The x-coordinate at which the event occurred relative to the containing display object.

read-only, inherited
localY → num

The y-coordinate at which the event occurred relative to the containing display object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited
shiftKey → bool

Indicates whether the Shift key is active (true) or inactive (false).

read-only, inherited
stageX → num

The x-coordinate of the input event relative to the stage.

read-only, inherited
stageY → num

The y-coordinate of the input event relative to the stage.

read-only, inherited
target EventDispatcher

The event target.

read-only, inherited
touchPointID → int

A unique identification number assigned to the touch point.

read-only
type → String

The type of event.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

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

inherited
preventDefault() → void

inherited
stopImmediatePropagation() → void

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

inherited
stopPropagation() → void

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

inherited
toString() → String

Returns a string representation of this object.

inherited