flash.ui

# MultitouchInputMode - AS3

Package | flash.ui
Class | public final class MultitouchInputMode
Inheritance | MultitouchInputMode Object

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2, Flash Lite 4

The MultitouchInputMode class provides values for the `inputMode` property in the flash.ui.Multitouch class. These values set the type of touch events the Flash runtime dispatches when the user interacts with a touch-enabled device.

View the examples

More examples

Set the input type

Related API Elements

flash.ui.Multitouch.inputMode

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants

| Constant | Defined By
--- | --- | ---
|  | GESTURE : String = "gesture" [static] 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. | MultitouchInputMode
|  | NONE : String = "none" [static] Specifies that all user contact with a touch-enabled device is interpreted as a type of mouse event. | MultitouchInputMode
|  | TOUCH_POINT : String = "touchPoint" [static] Specifies that events are dispatched only for basic touch events, such as a single finger tap. | MultitouchInputMode

Constant Detail

### GESTURE

Constant

`public static const GESTURE:String = "gesture"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2, Flash Lite 4

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.

Related API Elements

flash.ui.Multitouch.inputMode
flash.events.TransformGestureEvent
flash.events.GestureEvent
flash.events.PressAndTapGestureEvent
flash.events.TouchEvent

### NONE

Constant

`public static const NONE:String = "none"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2, Flash Lite 4

Specifies that all user contact with a touch-enabled device is interpreted as a type of mouse event.

Related API Elements

flash.ui.Multitouch.inputMode
flash.events.MouseEvent

### TOUCH_POINT

Constant

`public static const TOUCH_POINT:String = "touchPoint"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2, Flash Lite 4

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.

Related API Elements

flash.ui.Multitouch.inputMode
flash.events.TransformGestureEvent
flash.events.GestureEvent
flash.events.PressAndTapGestureEvent
flash.events.TouchEvent
Examples How to use this example
Multitouch_inputMode.as
The following example displays a message when the square drawn on mySprite is tapped on a touch-enabled screen:
Copy

    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);
    }

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00