Features  »  Supported Gestures  »  One Finger Double Tap Gesture

One Finger Double Tap

The ‘double tap’ event is the touch equivalent of a ‘mouse double click’ event. When a finger is placed on the screen and removed twice within certain spatial & temporal intervals, the event fires.

Using the One Finger Double Tap Gesture

One Finger Double Tap can be used to select items or provide a hierarchical selection structure when combined with other forms of Tap. One Finger Double Tap is used in the same context(s) as a ‘mouse double click’ event in a traditional user interface (UI).

Mechanics and Code Samples

To register a ‘double tap’ event, a finger must touch down on the screen and then be lifted up again and touch down again within a limited time period and within a limited spatial area on the touch screen surface. This ensures that the gesture registered is actually a ‘double tap’ and not unrelated touch events.

1
2
3
4
5
6
element.addEventListener(TouchEvent.TOUCH_DOUBLE_TAP, touchDoubleTapHandler);
private function touchDoubleTapHandler(e:TouchEvent):void {

    trace("e type:",e.type);

}

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 ‘One Finger Double Tap’ gesture has a spatial separation threshold between the first tap and the second tap. After the first two taps within a certain time period, the event will not respond to subsequent “rapid-fire” taps.

Related Gestures

One Finger Single Tap

Associated Tutorials

How To Create A Google Maps application with move, double-tap, rotate, scale and tilt