Features  »  Supported Gestures  »  Two Finger Flick Gesture

Two Finger Flick

The ‘two finger flick’ event allows users to flick or throw objects across the screen. The ‘two finger flick’ gesture causes objects to move in the direction of the flick with a velocity and acceleration determined by the strength of the flick, and returns an acceleration and a velocity value for both the X and Y coordinates of the objects.

Using the Two Finger Flick Gesture

The ‘two finger flick’ gesture is typically used to ‘throw’ an object quickly across the touch screen surface; for example, when passing an object between users at opposite ends of the screen.

Mechanics and Code Samples

To register a ‘two finger flick’, touch down and quickly flick the tips of two fingers across the touch screen surface.

1
container.addEventListener(GestureEvent.GESTURE_FLICK, gestureFlickHandler);
1
2
3
4
5
element.addEventListener(GestureEvent.GESTURE_FLICK);
function(event:GestureEvent):void {
    trace("acceleration:",e.accelerationX, e.accelerationY);
    trace("velocity:",e.velocityX, e.velocityY);
}

Parameters

All touch and gesture events have a localX and localY (relative) position as well as a stageX and stageY (absolute) position.

In addition, the ‘two finger flick’ gesture has both a spatial and temporal separation threshold that will return velocity and acceleration as false if the rate of acceleration is less than 1 px/interval or there’s a delay between when the finger stops moving and when it is lifted off the surface.

Related Gestures

One Finger Flick

Associated Tutorials

How To Create An Application Using The Flick Gesture