Two Finger Rotate

The ‘two finger rotate’ event allows the user to rotate an object using two fingers. The ‘two finger rotate’ gesture 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 Two Finger Rotate Gesture
The ‘two finger rotate’ gesture is typically used to rotate an object either clockwise or counterclockwise.
Mechanics and Code Samples
To register a ‘two finger rotate’, place two fingers on the surface and turn the hand at the wrist 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, two finger rotate returns event.value, which registers the change in angle of the two points.
