Multi-point Rotate

The ‘multi-point rotate’ event allows the user to rotate an object using the tips of the fingers on one hand and making a twisting motion. ‘Multi-point rotate’ calculates the change in orientation (rotation) of the touch points on an object relative to the orientation of the stage and adds the change to the previous value each time the event is detected. This value is used to incrementally change the angle of orientation of an object.
Using the Multi-point Rotate Gesture
The ‘multi-point rotate’ gesture is typically used to rotate an object either clockwise or counterclockwise.
Mechanics and Code Samples
To register a ‘multi-point rotate’, place both hands on the surface and move them simultaneously in a circular motion to rotate an image on the surface.
1 2 3 4 | element.addEventListener(GestureEvent.GESTURE_ROTATE); function (event:GestureEvent):void { trace("rotation", event.value); } |
Parameters
All touch and gesture events have a localX and localY (relative) position as well as a stageX and stageY (absolute) position.
In addition, multi-point rotate returns event.value, which measures the change in angle of the points.
