Gestures On Mobile

Zoom Gesture

Pinch to zoom in and zoom out on image or maps.

Multitouch.inputMode = MultitouchInputMode.GESTURE;

stage.addEventListener(TransformGestureEvent.GESTURE_ZOOM,zoomHandler);

private function zoomHandler(evt:TransformGestureEvent):void{

// previewImage is the container of image/map anything

previewImage.scaleX *= evt.scaleX;

previewImage.scaleY *= evt.scaleY;

}

Will be posting on more Gestures and Touch Events. Feel free for comments / suggestions :)

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*