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


When a user interacts with a device such as a mobile phone or tablet with a touch screen, the user typically touches the screen with his or her fingers or a pointing device. You can develop applications that respond to basic touch events (such as a single finger tap) with the TouchEvent object. Create event listeners using the event types defined in this object.


Use the Multitouch object to determine the current environment's support for touch interaction, and to manage the support of touch interaction if the current environment supports it.


Note: When objects are nested on the display list, touch events target the deepest possible nested object that is visible in the display list. This object is called the target node. To have a target node's ancestor (an object containing the target node in the display list) receive notification of a touch event, use EventDispatcher.addEventListener() on the ancestor node with the type parameter set to the specific touch event you want to detect.


Inherited from MouseEvent -> Event.


Can be created with method new:

Lib.Media.Events.TouchEvent.new(type, bubbles, cancelable, touchPointID, isPrimaryTouchPoint, localX, localY, sizeX, sizeY, relatedObject, ctrlKey, altKey, shiftKey, buttonDown, delta, commandKey, clickCount)

Creates an Event object that contains information about touch events.

type - The type of the event. Possible values are: 

TouchEvent.TOUCH_BEGIN, TouchEvent.TOUCH_END, TouchEvent.TOUCH_MOVE, TouchEvent.TOUCH_OUT, TouchEvent.TOUCH_OVER, TouchEvent.TOUCH_ROLL_OUT, TouchEvent.TOUCH_ROLL_OVER, TouchEvent.TOUCH_TAP

bubbles - (default = true) - Determines whether the Event object participates in the bubbling phase of the event flow.

cancelable - (default = false) - Determines whether the Event object can be canceled.

touchPointID - (default 0) A unique identification number (as an int) assigned to the touch point. 

isPrimaryTouchPoint - (default false) Indicates whether the first point of contact is mapped to mouse events.

localX - (default = 0) - The horizontal coordinate at which the event occurred relative to the containing sprite.

localY - (default = 0) - The vertical coordinate at which the event occurred relative to the containing sprite.

sizeX - Width of the contact area.

sizeY - Height of the contact area. 

relatedObject - (default = nil) - The complementary InteractiveObject instance that is affected by the event. For example, when a touchOut event occurs, relatedObject represents the display list object to which the pointing device now points.

ctrlKey - (default = false) - On Windows, indicates whether the Ctrl key is activated. On Mac, indicates whether either the Ctrl key or the Command key is activated. 

altKey - (default = false) - Indicates whether the Alt key is activated (Windows).

shiftKey - (default = false) - Indicates whether the Shift key is activated.

buttonDown - (default = false) - ignored

delta - (default = 0) - ignored

commandKey - (default = false) - Indicates whether the Command key is activated (Mac). 

clickCount - (default = 0) - ignored


Created MouseEvent object has properties:

altKey

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

buttonDown

ignored (false).

clickCount

[read-only] ignored

commandKey

Indicates whether the command key is activated (Mac) The value of property commandKey will have the same value as property ctrlKey on the Mac.

ctrlKey

On Windows, indicates whether the Ctrl key is active (true) or inactive (false).

delta

ignored

isPrimaryTouchPoint

(default false) Indicates whether the first point of contact is mapped to mouse events.

localX

When mouse locking is disabled, the horizontal coordinate at which the event occurred relative to the containing sprite.

localY

When mouse locking is disabled, the vertical coordinate at which the event occurred relative to the containing sprite.

relatedObject

A reference to a display list object that is related to the event.

shiftKey

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

sizeX

Width of the contact area.

sizeY

Height of the contact area.

stageX

[read-only] The horizontal coordinate at which the event occurred in global Stage coordinates.

stageY

[read-only] The vertical coordinate at which the event occurred in global Stage coordinates.

touchPointID

A unique identification number (as an int) assigned to the touch point.


methods:

clone()

Creates a copy of the TouchEvent object and sets the value of each property to match that of the original.


toString()

Returns a string that contains all the properties of the TouchEvent object.



Event types (some events may not currently supported):

Lib.Media.Events.TouchEvent.TOUCH_BEGIN

Defines the value of the type property of a TOUCH_BEGIN touch event object. 

Lib.Media.Events.TouchEvent.TOUCH_END

Defines the value of the type property of a TOUCH_END touch event object. 

Lib.Media.Events.TouchEvent.TOUCH_MOVE

Defines the value of the type property of a TOUCH_MOVE touch event object. 

Lib.Media.Events.TouchEvent.TOUCH_OUT

Defines the value of the type property of a TOUCH_OUT touch event object. 

Lib.Media.Events.TouchEvent.TOUCH_OVER

Defines the value of the type property of a TOUCH_OVER touch event object. 

Lib.Media.Events.TouchEvent.TOUCH_ROLL_OUT

Defines the value of the type property of a TOUCH_ROLL_OUT touch event object. 

Lib.Media.Events.TouchEvent.TOUCH_ROLL_OVER

Defines the value of the type property of a TOUCH_ROLL_OVER touch event object. 

Lib.Media.Events.TouchEvent.TOUCH_TAP

Defines the value of the type property of a TOUCH_TAP touch event object. 

Created with the Personal Edition of HelpNDoc: Produce online help for Qt applications