Thanks to devices like the Droid, Storm and iDevices the touch paradigm is much more familiar to users than it was a few years ago. That familiarity coupled with Flash Player 10.1′s multi-touch support means that Flash developers can finally develop apps tailored to touchscreen input. The prevalence of touchscreens has spawned a new vocabulary of input terms such as pinch, flick, swipe, touch and gesture among others. Some of those terms like “touch” and “gesture” are used interchangeably in generic discussions, but it’s important to know that they have very different meanings as far as ActionScript is concerned.
When you want to allow multi-touch input in Flash Player 10.1, you have to set the
Multitouch.inputMode property based on the type of input events you want to handle. Your options are
MultitouchInputMode.TOUCH_POINT (touch). Both modes handle touch input, but in different ways. The
GESTURE mode dispatches events for familiar predefined gestures like zoom (pinch), rotate and two-finger tap. You can react to the events dispatched by these gestures by accessing properties of these events. However, if you want get the raw input data and create your own custom gestures, you need to use the
TOUCH_POINT input mode. This would allow you to create custom gestures like a ten-finger tap for instance or five-finger swipe. (It’s worth noting that there is a third input mode,
NONE, which is the default mode that only allows mouse interaction.)
Before you go too far with your multi-touch development for Flash Player 10.1, check to see how many touchpoints and which gestures your hardware and operating system support.