Skip to main content
aassaaadf
Participant
December 7, 2014
Question

Flash AS3 Pinch Gesture Support

  • December 7, 2014
  • 1 reply
  • 490 views

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 ?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 7, 2014

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);

    }

aassaaadf
aassaaadfAuthor
Participant
December 7, 2014

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

kglad
Community Expert
Community Expert
December 7, 2014

then use the touchevent class to code whatever custom touch you want.