Setting the gesture input mode

Along with handling simple multi-touch events, AIR for iOS provides support for gestures such as zoom, rotation, and swipe. A gesture is a single event that is made up from a sequence of simpler multi-touch events. Although you can capture multi-touch events and translate them into gestures yourself, the Flash platform also provides support for the most common ones, reducing your workload.

In order to receive gesture events, you must select the appropriate input mode.

Let us see how this is done.

Getting ready

From Flash Professional, open chapter5\recipe5\recipe.fla from the book's accompanying code bundle.

Sitting on the stage is a dynamic text field named output. We will write some code to enable gesture input and ...

Get Flash iOS Apps Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.