The Multitouch Class

Must Read

2 Biggest Mistakes When Securing a Home Equity Debt Consolidation Loan

Right off the bat, we will get into explaining what are the most perilous dangers of this form of...

The Top Pitfalls of a Debt Consolidation Loan

When people are struggling under debt, there are many options available to them. Debt consolidation is something that has...

13 Exceptional Tips to Effectively Promote Your Business on Facebook

Post Content That is Informative and EngagingCreate content that encourages click-throughs or boosts discussion. Unless they're interesting enough to...


There is interest in the industry in delivering 3DTV services to mobile phones. It is perceived that simple lenticular...

Displaying Data

The application displays data by binding elements of the view to properties in the view model. For example, the...

Review Competing and Industry-Leading Web Sites

Check out your online competition. The term competition is referenced quite loosely in that industry leaders with whom you...

The Flash platform synthesizes gestures across platforms. It also provides the tools needed to access the raw touch data. While support for individual APIs can vary, some level of touch capability is currently compatible with Windows 7, iOS, Mac OS X, Android, and RIM.

The flash.ui.Multitouch class is a recent addition to the ActionScript language to support user input. The Android platform supports multitouch, but it is always a good practice to test the device’s capabilities:

import flash.ui.Multitouch;
if (Multitouch.supportsGestureEvents == true) {

The supportedGestures property returns an array of gestures that your specific device understands. This is particularly important to test if you use unusual gestures. For instance, the list of gestures for the Nexus One is:

gestureZoom, gestureRotate, gesturePan, gestureSwipe, gestureTwoFingerTap

For a summary of gesture definitions across platforms, see the handy reference at

Testing support for multitouch is done separately:

if (Multitouch.supportsTouchEvents == true) {

The maxTouchPoints property returns the number of touches supported simultaneously. Most Android devices currently support two points.

The flash.ui.MultitouchInputMode class provides the mechanism to select the mode of input the application uses. Only one mode can be active at a time.

When using the mode NONE, all events are interpreted as mouseEvent. This is the default mode:

import flash.ui.MultitouchInputMode;
Multitouch.inputMode = MultitouchInputMode.NONE

With the GESTURE mode, all events are interpreted as GestureEvent:

Multitouch.inputMode = MultitouchInputMode.GESTURE;

With the TOUCH_POINT mode, all events are interpreted as touchEvent:

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT

The mode can be changed at runtime, but you should use it only if you have a case that requires it and if it is not confusing to the user. Only one mode, the last one chosen, is possible at a time.


Latest News

Digital Marketing for Beginners

Digital marketing for starter, Let to basic learning about connecting with your audience in the right place at the...

More Articles Like This