Creates a new Touch object.
Indicates if the touch has been cancelled, which may happen when the app moves into the background ('Event.DEACTIVATE'). @default false
The x-position of the touch in stage coordinates. If you change this value, the previous one will be moved to "previousGlobalX".
The y-position of the touch in stage coordinates. If you change this value, the previous one will be moved to "previousGlobalY".
Height of the contact area. If the device does not support detecting the pressure, the value is 1.0.
The identifier of a touch. '0' for mouse events, an increasing number for touches.
The current phase the touch is in. @see TouchPhase
A value between 0.0 and 1.0 indicating force of the contact with the device. If the device does not support detecting the pressure, the value is 1.0.
The previous x-position of the touch in stage coordinates.
The previous y-position of the touch in stage coordinates.
The number of taps the finger made in a short amount of time. Use this to detect double-taps / double-clicks, etc.
The display object at which the touch occurred.
The moment the touch occurred (in seconds since application start).
Width of the contact area. If the device does not support detecting the pressure, the value is 1.0.
Creates a clone of the Touch object.
Converts the current location of a touch to the local coordinate system of a display
object. If you pass an out
-point, the result will be stored in this point
instead of creating a new object.
Returns the movement of the touch between the current and previous location.
If you pass an out
-point, the result will be stored in this point instead
of creating a new object.
Converts the previous location of a touch to the local coordinate system of a display
object. If you pass an out
-point, the result will be stored in this point
instead of creating a new object.
Indicates if the target or one of its children is touched.
Returns a description of the object.
Generated using TypeDoc
A Touch object contains information about the presence or movement of a finger or the mouse on the screen.
You receive objects of this type from a TouchEvent. When such an event is triggered, you can query it for all touches that are currently present on the screen. One touch object contains information about a single touch; it always transitions through a series of TouchPhases. Have a look at the TouchPhase class for more information.
The position of a touch
You can get the current and previous position in stage coordinates with the corresponding properties. However, you'll want to have the position in a different coordinate system most of the time. For this reason, there are methods that convert the current and previous touches into the local coordinate system of any object.
@see TouchEvent @see TouchPhase