The AMLTouchEvent class encapsulates information about a touch event. The system continually sends AMLTouchEvent objects to an application as fingers touch and move across a surface. A touch event provides a snapshot of all touches during a multi-touch sequence, most importantly the touches that are new or have changed for a particular target. A multi-touch sequence begins when a finger first touches the surface. Other fingers may subsequently touch the surface, and all fingers may move across the surface. The sequence ends when the last of these fingers is lifted from the surface. An application receives touch event objects during each phase of any touch.
Used to indicate the EventTarget whose EventListeners are currently being processed. This is particularly useful during capturing and bubbling.
defaultPrevented *
Boolean
true
Used to indicate whether preventDefault() has been called for this event.
detail *
Number
false
Specifies some detail information about the Event, depending on the type of event.
eventPhase *
Number
true
Used to indicate which phase of event flow is currently being evaluated.
metaKey
Boolean
true
If true, the meta key is pressed; otherwise, it is not.
namespaceURI *
String
true
The namespace URI associated with this event at initialization time, or null if it is unspecified.
rotation
Number
true
The delta rotation since the start of an event, in degrees, where clockwise is positive and counter-clockwise is negative. The initial value is 0.0.
scale
Number
true
The distance between two fingers since the start of an event, as a multiplier of the initial distance. The initial value is 1.0. If less than 1.0, the gesture is pinch close (to zoom out). If greater than 1.0, the gesture is pinch open (to zoom in).
screenX
Number
true
The x-coordinate of the event’s location in screen coordinates.
screenY
Number
true
The y-coordinate of the event’s location in screen coordinates.
shiftKey
Boolean
true
If true, the shift key is pressed; otherwise, it is not.
A collection of AMLTouch objects representing all touches that changed in this event.
nScale
Number
Required
The distance between two fingers since the start of an event as a multiplier of the initial distance. The initial value is 1.0. If less than 1.0, the gesture is pinch close (to zoom out). If greater than 1.0, the gesture is pinch open (to zoom in).
nRotation
Number
Required
The delta rotation since the start of an event, in degrees, where clockwise is positive and counter-clockwise is negative. The initial value is 0.0.
If an event is cancelable, the preventDefault method is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur.
The stopPropagation method is used prevent further propagation of an event during event flow. The event will complete dispatch to all listeners on the current EventTarget before event flow stops. This method may be used during any stage of event flow.