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
-
- Object
- Event
- InputEvent
- TouchEvent
Constructors
Properties
- altKey → bool?
-
Indicates whether the Alt key is active (true) or inactive (false).
finalinherited
- bubbles → bool
-
Indicates whether an event is a bubbling event. If the event can bubble,
this value is true; otherwise it is false.
no setterinherited
- captures → bool
-
Indicates whether an event is a capturing event.
no setterinherited
- ctrlKey → bool?
-
Indicates whether the Ctrl key is active (true) or inactive (false).
finalinherited
- currentTarget → EventDispatcher?
-
The object that is actively processing the Event object with an event
listener.
no setterinherited
- eventPhase → EventPhase
-
The current phase in the event flow.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDefaultPrevented → bool
-
no setterinherited
- isImmediatePropagationStopped → bool
-
Indicates if the propagation of this event has been stopped.
no setterinherited
- isPrimaryTouchPoint → bool
-
Indicates whether the first point of contact is mapped to mouse events.
final
- isPropagationStopped → bool
-
Indicates if the propagation of this event has been stopped.
no setterinherited
- localX → num
-
The x-coordinate at which the event occurred relative
to the containing display object.
finalinherited
- localY → num
-
The y-coordinate at which the event occurred relative
to the containing display object.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shiftKey → bool?
-
Indicates whether the Shift key is active (true) or inactive (false).
finalinherited
- stageX → num
-
The x-coordinate of the input event relative to the stage.
finalinherited
- stageY → num
-
The y-coordinate of the input event relative to the stage.
finalinherited
- target → EventDispatcher?
-
The event target.
no setterinherited
- touchPointID → int
-
A unique identification number assigned to the touch point.
final
- type → String
-
The type of event.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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 -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- TOUCH_BEGIN → const String
- TOUCH_CANCEL → const String
- TOUCH_END → const String
- TOUCH_MOVE → const String
- TOUCH_OUT → const String
- TOUCH_OVER → const String
- TOUCH_ROLL_OUT → const String
- TOUCH_ROLL_OVER → const String
- TOUCH_TAP → const String