1 Reply Latest reply on Nov 24, 2015 6:41 AM by kglad

    Multi touch in AS2

    mandar vedak Level 1

      Hello,

       

      i am looking for gesture zoom in zoom out.

       

      This is AS3 code i want to convert this into AS2

       

      Multitouch.inputMode = MultitouchInputMode.GESTURE;

      elephant.addEventListener(TransformGestureEvent.GESTURE_ZOOM, onZoom);

      elephant.addEventListener(TransformGestureEvent.GESTURE_ROTATE, onRotate);

      private function onZoom(e:TransformGestureEvent):void

      {

      var elephant:Sprite = e.target as Sprite;

      elephant.scaleX *= e.scaleX;

      elephant.scaleY *= e.scaleY;

      }

      private function onRotate(e:TransformGestureEvent):void

      {

      var elephant:Sprite = e.target as Sprite;

      elephant.rotation += e.rotation;

      }