Touch vs. Gesture

Posted by & filed under Flash.

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.GESTURE and 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.

4 Responses to “Touch vs. Gesture”

  1. Diego

    Thanks for this information!! I’m developing an app in as3 and a would like to know if is it possible to allow both kinds of touch inputs: TOUCH_POINT and GESTURE. If there is a picture on the stage, the user should be able to zoom on it (pinch gesture event) and to move it around the stage (click/drag touch event). How can that be possibly done?

    Thanks a lot again for this post! (Y)

  2. Jason

    Hi Diego,

    I noticed your message from last year regarding using lee brimelow’s gesture support. The link to the code is broken on his site. Do you still happen to have it? Did it work well for you?


Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>