Touch, multitouch and gesture input
Flash Player 10.1 and later, Adobe AIR 2 and
The touch event handling features of the Flash Platform include
input from a single point of contact or multiple points of contact
on touch-enabled devices. And, the Flash runtimes handle events
that combine multiple touch points with movement to create a gesture.
In other words, Flash runtimes interpret two types of input:
- input with a single point device such as a finger, stylus,
or other tool on a touch-enabled device. Some devices support multiple
simultaneous points of contact with a finger or stylus.
- input with more than one simultaneous point of contact.
- Input interpreted by a device or operating system in response
to one or more touch events. For example, a user rotates two fingers
simultaneously, and the device or operating system interprets that
touch input as a rotation gesture. Some gestures are performed with
one finger or touch point, and some gestures require multiple touch
points. The device or operating system establishes the type of gesture
to assign to the input.
Both touch and gesture input can be multitouch input depending
on the user’s device. ActionScript provides API for handling touch
events, gesture events, and individually tracked touch events for
Note: Listening for touch and gesture events can consume a significant
amount of processing resources (equivalent to rendering several
frames per second), depending on the computing device and operating
system. It is often better to use mouse events when you do not actually
need the extra functionality provided by touch or gestures. When
you do use touch or gesture events, consider reducing the amount
of graphical changes that can occur, especially when such events
can be dispatched rapidly, as during a pan, rotate, or zoom operation.
For example, you could stop animation within a component while the
user resizes it using a zoom gesture.