Copy link to clipboard
Copied
I'm working on a Flash as3 project and need to detect a pinch (move two fingers toward each other )
does this gesture supported in as3 ?
how can i make something similar to it ?
Copy link to clipboard
Copied
yes, it is. this is from the multitouch class.
Multitouch.inputMode = MultitouchInputMode.GESTURE;
for each (var item:String in Multitouch.supportedGestures) {
trace("gesture " + item);
if (item == TransformGestureEvent.GESTURE_PAN)
img.addEventListener(TransformGestureEvent.GESTURE_PAN, onPan);
else if (item == TransformGestureEvent.GESTURE_ROTATE)
img.addEventListener(TransformGestureEvent.GESTURE_ROTATE, onRotate);
else if (item == TransformGestureEvent.GESTURE_SWIPE)
img.addEventListener(TransformGestureEvent.GESTURE_SWIPE, onSwipe);
else if (item == TransformGestureEvent.GESTURE_ZOOM)
img.addEventListener(TransformGestureEvent.GESTURE_ZOOM, onZoom);
}
Copy link to clipboard
Copied
thank you...but if you mean zoom gesture it is not work like i want in my case
i want to make two objects cross by using a pinch
Copy link to clipboard
Copied
then use the touchevent class to code whatever custom touch you want.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now