TouchEvent class

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

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

isPrimaryTouchPoint → bool
Indicates whether the first point of contact is mapped to mouse events.
final
touchPointID → int
A unique identification number assigned to the touch point.
final
altKey → bool
Indicates whether the Alt key is active (true) or inactive (false).
final, 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).
final, 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
The 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
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.
final, inherited
localY → num
The y-coordinate at which the event occurred relative to the containing display object.
final, 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).
final, inherited
stageX → num
The x-coordinate of the input event relative to the stage.
final, inherited
stageY → num
The y-coordinate of the input event relative to the stage.
final, inherited
target EventDispatcher
The event target. [...]
read-only, inherited
type → String
The type of event.
read-only, 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

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Constants

TOUCH_BEGIN → const String
'touchBegin'
TOUCH_CANCEL → const String
'touchCancel'
TOUCH_END → const String
'touchEnd'
TOUCH_MOVE → const String
'touchMove'
TOUCH_OUT → const String
'touchOut'
TOUCH_OVER → const String
'touchOver'
TOUCH_ROLL_OUT → const String
'touchRollOut'
TOUCH_ROLL_OVER → const String
'touchRollOver'
TOUCH_TAP → const String
'touchTap'