Array

The Multitouch Class

Must Read

DUI Defense Attorneys

If you are caught driving while drunk, you are definitely in big trouble. The police officers who arrest you...

You Can Save Big Money on Your Student Loan Payment – But Hurry!

Student Loan ConsolidationYou worked hard. You studied late nights and spent hours in the library doing research. You took...

Student College Loans Are a Liability – Discover Why You Have Been Misinformed All These Years

Most people are taught to go to school, get good grades and graduate in order to get a good...

Overriding a Dimmed Screen

After your application is idle for a while, the OS makes the device screen go into dimming mode and...

Home Equity Loans Can Also Be Refinanced!

Lower interest rates and monthly home equity loan payments can make cash available for other usage or make debt...

Understanding College Loan Consolidation

Though most students are driven to take a college loan to smoothly complete their education, they realize the entire...
Admin
test

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) {
trace(Multitouch.supportedGestures);
}

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 http://www.lukew.com/ff/entry.asp?1071.

Testing support for multitouch is done separately:

if (Multitouch.supportsTouchEvents == true) {
trace(Multitouch.maxTouchPoints);
}

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

What are 7 things poor people do that the rich don’t?

1. poor people watch TV in which people read books how many hours you spend in front of the TV and when...

Top 18 best small business ideas for beginners starting

A small business can be frightening and requires plenty of careful planning there are many small business ideas which can be beneficial...

Summer that makes you happy

We saw were already here I've been thinking about some of the things. I used to do with my husband even though...

4 Point to helpful tips specifically for caregivers

What you need to take a vacation. I know it sounds impossible creative and try to make it work for you almost...

More Articles Like This