Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Flash AS3 Pinch Gesture Support

Community Beginner ,
Dec 07, 2014 Dec 07, 2014

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 ?

TOPICS
ActionScript
439
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 07, 2014 Dec 07, 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);

    }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 07, 2014 Dec 07, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 07, 2014 Dec 07, 2014
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines