public static const GESTURE:String = "gesture"
Language version: | ActionScript 3.0 |
Specifies that TransformGestureEvent, PressAndTapGestureEvent, and GestureEvent events are dispatched for the related user interaction supported by the current environment,
and other touch events (such as a simple tap) are interpreted as mouse events.
See also
public static const NONE:String = "none"
Language version: | ActionScript 3.0 |
Specifies that all user contact with a touch-enabled device is interpreted as a type of mouse event.
See also
public static const TOUCH_POINT:String = "touchPoint"
Language version: | ActionScript 3.0 |
Specifies that events are dispatched only for basic touch events, such as a single finger tap. When you use this setting,
events listed in the TouchEvent class are dispatched; events listed in the TransformGestureEvent, PressAndTapGestureEvent, and GestureEvent classes are not dispatched.
See also
The following example displays a message when the
square drawn on mySprite is tapped on a touch-enabled screen:
Multitouch.inputMode=MultitouchInputMode.TOUCH_POINT;
var mySprite:Sprite = new Sprite();
var myTextField:TextField = new TextField();
mySprite.graphics.beginFill(0x336699);
mySprite.graphics.drawRect(0,0,40,40);
addChild(mySprite);
mySprite.addEventListener(TouchEvent.TOUCH_TAP, taphandler);
function taphandler(e:TouchEvent): void {
myTextField.text = "I've been tapped";
myTextField.y = 50;
addChild(myTextField);
}