flash.display

# InteractiveObject - AS3

Package | flash.display
Class | public class InteractiveObject
Inheritance | InteractiveObject DisplayObject EventDispatcher Object
Subclasses | DisplayObjectContainer, SimpleButton, TextField

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

The InteractiveObject class is the abstract base class for all display objects with which the user can interact, using the mouse, keyboard, or other user input device.

You cannot instantiate the InteractiveObject class directly. A call to the `new InteractiveObject()` constructor throws an `ArgumentError` exception.

The InteractiveObject class itself does not include any APIs for rendering content onscreen. To create a custom subclass of the InteractiveObject class, extend one of the subclasses that do have APIs for rendering content onscreen, such as the Sprite, SimpleButton, TextField, or MovieClip classes.

View the examples

Learn more

Open a soft keyboard in a mobile Flex application
Display programming
Basics of display programming
Core display classes

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | accessibilityImplementation : AccessibilityImplementation The current accessibility implementation (AccessibilityImplementation) for this InteractiveObject instance. | InteractiveObject
|  | accessibilityProperties : AccessibilityProperties The current accessibility options for this display object. | DisplayObject
|  | alpha : Number Indicates the alpha transparency value of the object specified. | DisplayObject
|  | blendMode : String A value from the BlendMode class that specifies which blend mode to use. | DisplayObject
|  | blendShader : Shader [write-only] Sets a shader that is used for blending the foreground and background. | DisplayObject
|  | cacheAsBitmap : Boolean If set to true, Flash runtimes cache an internal bitmap representation of the display object. | DisplayObject
|  | cacheAsBitmapMatrix : Matrix If non-null, this Matrix object defines how a display object is rendered when cacheAsBitmap is set to true. | DisplayObject
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | contextMenu : NativeMenu Specifies the context menu associated with this object. | InteractiveObject
|  | doubleClickEnabled : Boolean Specifies whether the object receives doubleClick events. | InteractiveObject
|  | filters : Array An indexed array that contains each filter object currently associated with the display object. | DisplayObject
|  | focusRect : Object Specifies whether this object displays a focus rectangle. | InteractiveObject
|  | height : Number Indicates the height of the display object, in pixels. | DisplayObject
|  | loaderInfo : LoaderInfo [read-only] Returns a LoaderInfo object containing information about loading the file to which this display object belongs. | DisplayObject
|  | mask : DisplayObject The calling display object is masked by the specified mask object. | DisplayObject
|  | metaData : Object Obtains the meta data object of the DisplayObject instance if meta data was stored alongside the the instance of this DisplayObject in the SWF file through a PlaceObject4 tag. | DisplayObject
|  | mouseEnabled : Boolean Specifies whether this object receives mouse, or other user input, messages. | InteractiveObject
|  | mouseX : Number [read-only] Indicates the x coordinate of the mouse or user input device position, in pixels. | DisplayObject
|  | mouseY : Number [read-only] Indicates the y coordinate of the mouse or user input device position, in pixels. | DisplayObject
|  | name : String Indicates the instance name of the DisplayObject. | DisplayObject
|  | needsSoftKeyboard : Boolean Specifies whether a virtual keyboard (an on-screen, software keyboard) should display when this InteractiveObject instance receives focus. | InteractiveObject
|  | opaqueBackground : Object Specifies whether the display object is opaque with a certain background color. | DisplayObject
|  | parent : DisplayObjectContainer [read-only] Indicates the DisplayObjectContainer object that contains this display object. | DisplayObject
|  | root : DisplayObject [read-only] For a display object in a loaded SWF file, the root property is the top-most display object in the portion of the display list's tree structure represented by that SWF file. | DisplayObject
|  | rotation : Number Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation. | DisplayObject
|  | rotationX : Number Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject
|  | rotationY : Number Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject
|  | rotationZ : Number Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject
|  | scale9Grid : Rectangle The current scaling grid that is in effect. | DisplayObject
|  | scaleX : Number Indicates the horizontal scale (percentage) of the object as applied from the registration point. | DisplayObject
|  | scaleY : Number Indicates the vertical scale (percentage) of an object as applied from the registration point of the object. | DisplayObject
|  | scaleZ : Number Indicates the depth scale (percentage) of an object as applied from the registration point of the object. | DisplayObject
|  | scrollRect : Rectangle The scroll rectangle bounds of the display object. | DisplayObject
|  | softKeyboard : String Controls the appearance of the soft keyboard. | InteractiveObject
|  | softKeyboardInputAreaOfInterest : Rectangle Defines the area that should remain on-screen when a soft keyboard is displayed (not available on iOS). | InteractiveObject
|  | stage : Stage [read-only] The Stage of the display object. | DisplayObject
|  | tabEnabled : Boolean Specifies whether this object is in the tab order. | InteractiveObject
|  | tabIndex : int Specifies the tab ordering of objects in a SWF file. | InteractiveObject
|  | transform : flash.geom:Transform An object with properties pertaining to a display object's matrix, color transform, and pixel bounds. | DisplayObject
|  | visible : Boolean Whether or not the display object is visible. | DisplayObject
|  | width : Number Indicates the width of the display object, in pixels. | DisplayObject
|  | x : Number Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. | DisplayObject
|  | y : Number Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of the parent DisplayObjectContainer. | DisplayObject
|  | z : Number Indicates the z coordinate position along the z-axis of the DisplayObject instance relative to the 3D parent container. | DisplayObject

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | InteractiveObject() Calling the new InteractiveObject() constructor throws an ArgumentError exception. | InteractiveObject
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. | EventDispatcher
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | getBounds(targetCoordinateSpace:DisplayObject):Rectangle Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. | DisplayObject
|  | getRect(targetCoordinateSpace:DisplayObject):Rectangle Returns a rectangle that defines the boundary of the display object, based on the coordinate system defined by the targetCoordinateSpace parameter, excluding any strokes on shapes. | DisplayObject
|  | globalToLocal(point:Point):Point Converts the point object from the Stage (global) coordinates to the display object's (local) coordinates. | DisplayObject
|  | globalToLocal3D(point:Point):Vector3D Converts a two-dimensional point from the Stage (global) coordinates to a three-dimensional display object's (local) coordinates. | DisplayObject
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | EventDispatcher
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | hitTestObject(obj:DisplayObject):Boolean Evaluates the bounding box of the display object to see if it overlaps or intersects with the bounding box of the obj display object. | DisplayObject
|  | hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters. | DisplayObject
|  | 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
|  | local3DToGlobal(point3d:Vector3D):Point Converts a three-dimensional point of the three-dimensional display object's (local) coordinates to a two-dimensional point in the Stage (global) coordinates. | DisplayObject
|  | localToGlobal(point:Point):Point Converts the point object from the display object's (local) coordinates to the Stage (global) coordinates. | DisplayObject
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | requestSoftKeyboard():Boolean Raises a virtual keyboard. | InteractiveObject
|  | 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
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | EventDispatcher

Events
Click for more information on events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | activate | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher
|  | added | Dispatched when a display object is added to the display list. | DisplayObject
|  | addedToStage | Dispatched when a display object is added to the on stage display list, either directly or through the addition of a sub tree in which the display object is contained. | DisplayObject
|  | clear | Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu. | InteractiveObject
|  | click | Dispatched when a user presses and releases the main button of the user's pointing device over the same InteractiveObject. | InteractiveObject
|  | contextMenu | Dispatched when a user gesture triggers the context menu associated with this interactive object in an AIR application. | InteractiveObject
|  | copy | Dispatched when the user activates the platform-specific accelerator key combination for a copy operation or selects 'Copy' from the text context menu. | InteractiveObject
|  | cut | Dispatched when the user activates the platform-specific accelerator key combination for a cut operation or selects 'Cut' from the text context menu. | InteractiveObject
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher
|  | doubleClick | Dispatched when a user presses and releases the main button of a pointing device twice in rapid succession over the same InteractiveObject when that object's doubleClickEnabled flag is set to true. | InteractiveObject
|  | enterFrame | [broadcast event] Dispatched when the playhead is entering a new frame. | DisplayObject
|  | exitFrame | [broadcast event] Dispatched when the playhead is exiting the current frame. | DisplayObject
|  | focusIn | Dispatched after a display object gains focus. | InteractiveObject
|  | focusOut | Dispatched after a display object loses focus. | InteractiveObject
|  | frameConstructed | [broadcast event] Dispatched after the constructors of frame display objects have run but before frame scripts have run. | DisplayObject
|  | gestureDirectionalTap | Dispatched when the user creates a point of contact along the edge of the touch surface with an InteractiveObject instance, (such as tapping along the edge of the touch surface on Siri Remote for Apple TV) Some devices might also interpret this contact as a combination of several touch events, as well. | InteractiveObject
|  | gestureLongPress | Dispatched when the user presses two points of contact over the same InteractiveObject instance on a touch-enabled device (such as presses and releases two fingers over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | gesturePan | Dispatched when the user moves a point of contact over the InteractiveObject instance on a touch-enabled device (such as moving a finger from left to right over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | gestureRotate | Dispatched when the user performs a rotation gesture at a point of contact with an InteractiveObject instance (such as touching two fingers and rotating them over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | gestureSwipe | Dispatched when the user performs a swipe gesture at a point of contact with an InteractiveObject instance (such as touching three fingers to a screen and then moving them in parallel over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | gestureTap | Dispatched when the user creates a point of contact with an InteractiveObject instance, then taps on a touch-enabled device (such as placing several fingers over a display object to open a menu and then taps one finger to select a menu item on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | gestureZoom | Dispatched when the user performs a zoom gesture at a point of contact with an InteractiveObject instance (such as touching two fingers to a screen and then quickly spreading the fingers apart over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | imeStartComposition | This event is dispatched to any client app that supports inline input with an IME | InteractiveObject
|  | keyDown | Dispatched when the user presses a key. | InteractiveObject
|  | keyFocusChange | Dispatched when the user attempts to change focus by using keyboard navigation. | InteractiveObject
|  | keyUp | Dispatched when the user releases a key. | InteractiveObject
|  | middleClick | Dispatched when a user presses and releases the middle button of the user's pointing device over the same InteractiveObject. | InteractiveObject
|  | middleMouseDown | Dispatched when a user presses the middle pointing device button over an InteractiveObject instance. | InteractiveObject
|  | middleMouseUp | Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject
|  | mouseDown | Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject
|  | mouseFocusChange | Dispatched when the user attempts to change focus by using a pointer device. | InteractiveObject
|  | mouseMove | Dispatched when a user moves the pointing device while it is over an InteractiveObject. | InteractiveObject
|  | mouseOut | Dispatched when the user moves a pointing device away from an InteractiveObject instance. | InteractiveObject
|  | mouseOver | Dispatched when the user moves a pointing device over an InteractiveObject instance. | InteractiveObject
|  | mouseUp | Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject
|  | mouseWheel | Dispatched when a mouse wheel is spun over an InteractiveObject instance. | InteractiveObject
|  | nativeDragComplete | Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture. | InteractiveObject
|  | nativeDragDrop | Dispatched by the target InteractiveObject when a dragged object is dropped on it and the drop has been accepted with a call to DragManager.acceptDragDrop(). | InteractiveObject
|  | nativeDragEnter | Dispatched by an InteractiveObject when a drag gesture enters its boundary. | InteractiveObject
|  | nativeDragExit | Dispatched by an InteractiveObject when a drag gesture leaves its boundary. | InteractiveObject
|  | nativeDragOver | Dispatched by an InteractiveObject continually while a drag gesture remains within its boundary. | InteractiveObject
|  | nativeDragStart | Dispatched at the beginning of a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject
|  | nativeDragUpdate | Dispatched during a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject
|  | paste | Dispatched when the user activates the platform-specific accelerator key combination for a paste operation or selects 'Paste' from the text context menu. | InteractiveObject
|  | proximityBegin | Dispatched when the user lowers an active stylus past the proximity detection threshold of the screen. | InteractiveObject
|  | proximityEnd | Dispatched when the user lifts an active stylus above the proximity detection threshold of the screen. | InteractiveObject
|  | proximityMove | Dispatched when the user moves an active stylus over the screen while remaining within the proximity detection threshold. | InteractiveObject
|  | proximityOut | Dispatched when the user moves an active stylus away from this InteractiveObject while remaining within the proximity detection threshold of the screen. | InteractiveObject
|  | proximityOver | Dispatched when the user moves an active stylus directly above this InteractiveObject while remaining within the proximity detection threshold of the screen. | InteractiveObject
|  | proximityRollOut | Dispatched when the user moves an active stylus away from this InteractiveObject and any of its children while remaining within the proximity detection threshold of the screen. | InteractiveObject
|  | proximityRollOver | Dispatched when the user moves an active stylus over this InteractiveObject from outside the object's tree of descendents in the display list (while remaining within the proximity detection threshold of the screen). | InteractiveObject
|  | releaseOutside | Dispatched when a user releases the button on the pointing device after the user first pressed the button over an InteractiveObject instance and then moved the pointing device off of the InteractiveObject instance. | InteractiveObject
|  | removed | Dispatched when a display object is about to be removed from the display list. | DisplayObject
|  | removedFromStage | Dispatched when a display object is about to be removed from the display list, either directly or through the removal of a sub tree in which the display object is contained. | DisplayObject
|  | render | [broadcast event] Dispatched when the display list is about to be updated and rendered. | DisplayObject
|  | rightClick | Dispatched when a user presses and releases the right button of the user's pointing device over the same InteractiveObject. | InteractiveObject
|  | rightMouseDown | Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject
|  | rightMouseUp | Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject
|  | rollOut | Dispatched when the user moves a pointing device away from an InteractiveObject instance. | InteractiveObject
|  | rollOver | Dispatched when the user moves a pointing device over an InteractiveObject instance. | InteractiveObject
|  | selectAll | Dispatched when the user activates the platform-specific accelerator key combination for a select all operation or selects 'Select All' from the text context menu. | InteractiveObject
|  | softKeyboardActivate | Dispatched immediately after the soft keyboard is raised. | InteractiveObject
|  | softKeyboardActivating | Dispatched immediately before the soft keyboard is raised. | InteractiveObject
|  | softKeyboardDeactivate | Dispatched immediately after the soft keyboard is lowered. | InteractiveObject
|  | tabChildrenChange | Dispatched when the value of the object's tabChildren flag changes. | InteractiveObject
|  | tabEnabledChange | Dispatched when the object's tabEnabled flag changes. | InteractiveObject
|  | tabIndexChange | Dispatched when the value of the object's tabIndex property changes. | InteractiveObject
|  | textInput | Dispatched when a user enters one or more characters of text. | InteractiveObject
|  | touchBegin | Dispatched when the user first contacts a touch-enabled device (such as touches a finger to a mobile phone or tablet with a touch screen). | InteractiveObject
|  | touchEnd | Dispatched when the user removes contact with a touch-enabled device (such as lifts a finger off a mobile phone or tablet with a touch screen). | InteractiveObject
|  | touchMove | Dispatched when the user touches the device, and is continuously dispatched until the point of contact is removed. | InteractiveObject
|  | touchOut | Dispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device (such as drags a finger from one display object to another on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | touchOver | Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | touchRollOut | Dispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device (such as drags a finger from over a display object to a point outside the display object on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | touchRollOver | Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject
|  | touchTap | Dispatched when the user lifts the point of contact over the same InteractiveObject instance on which the contact was initiated on a touch-enabled device (such as presses and releases a finger from a single point over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject

Property Detail

### accessibilityImplementation

property

`accessibilityImplementation:AccessibilityImplementation`

Language Version: | ActionScript 3.0

The current accessibility implementation (AccessibilityImplementation) for this InteractiveObject instance.

Implementation
`public function get accessibilityImplementation():AccessibilityImplementation`
`public function set accessibilityImplementation(value:AccessibilityImplementation):void`

Related API Elements

flash.accessibility.AccessibilityImplementation

### contextMenu

property

`contextMenu:NativeMenu`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Specifies the context menu associated with this object.

For content running in Flash Player, this property is a ContextMenu object. In the AIR runtime, the ContextMenu class extends the NativeMenu class, however Flash Player only supports the ContextMenu class, not the NativeMenu class.

Note: TextField objects always include a clipboard menu in the context menu. The clipboard menu contains Cut, Copy, Paste, Clear, and Select All commands. You cannot remove these commands from the context menu for TextField objects. For TextField objects, selecting these commands (or their keyboard equivalents) does not generate `clear`, `copy`, `cut`, `paste`, or `selectAll` events.

Implementation
`public function get contextMenu():NativeMenu`
`public function set contextMenu(value:NativeMenu):void`
Example ( How to use this example )
The following example shows how you can add a custom context menu item to a Sprite object by setting the Sprite's contextMenu property to a ContextMenu object. Example provided by ActionScriptExamples.com.
Copy

    var red_cmi:ContextMenuItem = new ContextMenuItem("red");
    red_cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, cmi_menuItemSelect);

    var cm:ContextMenu = new ContextMenu();
    cm.customItems.push(red_cmi);
    cm.hideBuiltInItems();

    var spr:Sprite = new Sprite();
    spr.contextMenu = cm;
    spr.graphics.beginFill(0x000000);
    spr.graphics.drawRect(0, 0, 120, 90);
    spr.graphics.endFill();
    spr.x = 10;
    spr.y = 10;
    addChild(spr);

    function cmi_menuItemSelect(evt:ContextMenuEvent):void {
        spr.graphics.clear();
        spr.graphics.beginFill(0xFF0000);
        spr.graphics.drawRect(0, 0, 120, 90);
        spr.graphics.endFill();
    }

### doubleClickEnabled

property

`doubleClickEnabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Specifies whether the object receives `doubleClick` events. The default value is `false`, which means that by default an InteractiveObject instance does not receive `doubleClick` events. If the `doubleClickEnabled` property is set to `true`, the instance receives `doubleClick` events within its bounds. The `mouseEnabled` property of the InteractiveObject instance must also be set to `true` for the object to receive `doubleClick` events.

No event is dispatched by setting this property. You must use the `addEventListener()` method to add an event listener for the `doubleClick` event.

Implementation
`public function get doubleClickEnabled():Boolean`
`public function set doubleClickEnabled(value:Boolean):void`

Related API Elements

doubleClick
mouseEnabled
flash.display.DisplayObjectContainer.mouseChildren

### focusRect

property

`focusRect:Object`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Specifies whether this object displays a focus rectangle. It can take one of three values: `true`, `false`, or `null`. Values of `true` and `false` work as expected, specifying whether or not the focus rectangle appears. A value of `null` indicates that this object obeys the `stageFocusRect` property of the Stage.

Implementation
`public function get focusRect():Object`
`public function set focusRect(value:Object):void`

### mouseEnabled

property

`mouseEnabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Specifies whether this object receives mouse, or other user input, messages. The default value is `true`, which means that by default any InteractiveObject instance that is on the display list receives mouse events or other user input events. If `mouseEnabled` is set to `false`, the instance does not receive any mouse events (or other user input events like keyboard events). Any children of this instance on the display list are not affected. To change the `mouseEnabled` behavior for all children of an object on the display list, use `flash.display.DisplayObjectContainer.mouseChildren`.

No event is dispatched by setting this property. You must use the `addEventListener()` method to create interactive functionality.

Implementation
`public function get mouseEnabled():Boolean`
`public function set mouseEnabled(value:Boolean):void`

Related API Elements

flash.display.DisplayObjectContainer.mouseChildren

### needsSoftKeyboard

property

`needsSoftKeyboard:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.2, AIR 2.6

Specifies whether a virtual keyboard (an on-screen, software keyboard) should display when this InteractiveObject instance receives focus.

By default, the value is `false` and focusing an InteractiveObject instance does not raise a soft keyboard. If the `needsSoftKeyboard` property is set to `true`, the runtime raises a soft keyboard when the InteractiveObject instance is ready to accept user input. An InteractiveObject instance is ready to accept user input after a programmatic call to set the Stage `focus` property or a user interaction, such as a "tap." If the client system has a hardware keyboard available or does not support virtual keyboards, then the soft keyboard is not raised.

The InteractiveObject instance dispatches `softKeyboardActivating`, `softKeyboardActivate`, and `softKeyboardDeactivate` events when the soft keyboard raises and lowers.

Note: This property is not supported in AIR applications on iOS.

Implementation
`public function get needsSoftKeyboard():Boolean`
`public function set needsSoftKeyboard(value:Boolean):void`

Related API Elements

softKeyboardActivating
softKeyboardActivate
softKeyboardDeactivate

### softKeyboard

property

`softKeyboard:String`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 21.0

Controls the appearance of the soft keyboard.

Devices with soft keyboards can customize the keyboard's buttons to match the type of input expected. For example, if numeric input is expected, a device can use `SoftKeyboardType.NUMBER` to display only numbers on the soft keyboard. Valid values are defined as constants in the SoftKeyboardType class:

- "default"
- "punctuation"
- "url"
- "number"
- "contact"
- "email"

These values serve as hints, to help a device display the best keyboard for the current operation.

The default value is `SoftKeyboardType.DEFAULT.`

Implementation
`public function get softKeyboard():String`
`public function set softKeyboard(value:String):void`
Throws

| `ArgumentError` — If set to any value which is not a member of `SoftKeyboardType`

Related API Elements

flash.text.SoftKeyboardType

### softKeyboardInputAreaOfInterest

property

`softKeyboardInputAreaOfInterest:Rectangle`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.2, AIR 2.6

Defines the area that should remain on-screen when a soft keyboard is displayed (not available on iOS).

If the `needsSoftKeyboard` property of this InteractiveObject is `true`, then the runtime adjusts the display as needed to keep the object in view while the user types. Ordinarily, the runtime uses the object bounds obtained from the `DisplayObject.getBounds()` method. You can specify a different area using this `softKeyboardInputAreaOfInterest` property.

Specify the `softKeyboardInputAreaOfInterest` in stage coordinates.

Note: On Android, the `softKeyboardInputAreaOfInterest` is not respected in landscape orientations.

Note: `softKeyboardInputAreaOfInterest` is not supported on iOS.

Implementation
`public function get softKeyboardInputAreaOfInterest():Rectangle`
`public function set softKeyboardInputAreaOfInterest(value:Rectangle):void`

Related API Elements

flash.display.DisplayObject.getBounds()

### tabEnabled

property

`tabEnabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Specifies whether this object is in the tab order. If this object is in the tab order, the value is `true`; otherwise, the value is `false`. By default, the value is `false`, except for the following:

- For a SimpleButton object, the value is `true`.
- For a TextField object with `type = "input"`, the value is `true`.
- For a Sprite object or MovieClip object with `buttonMode = true`, the value is `true`.

Implementation
`public function get tabEnabled():Boolean`
`public function set tabEnabled(value:Boolean):void`

### tabIndex

property

`tabIndex:int`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Specifies the tab ordering of objects in a SWF file. The `tabIndex` property is -1 by default, meaning no tab index is set for the object.

If any currently displayed object in the SWF file contains a `tabIndex` property, automatic tab ordering is disabled, and the tab ordering is calculated from the `tabIndex` properties of objects in the SWF file. The custom tab ordering includes only objects that have `tabIndex` properties.

The `tabIndex` property can be a non-negative integer. The objects are ordered according to their `tabIndex` properties, in ascending order. An object with a `tabIndex` value of 1 precedes an object with a `tabIndex` value of 2. Do not use the same `tabIndex` value for multiple objects.

The custom tab ordering that the `tabIndex` property defines is flat. This means that no attention is paid to the hierarchical relationships of objects in the SWF file. All objects in the SWF file with `tabIndex` properties are placed in the tab order, and the tab order is determined by the order of the `tabIndex` values.

Note: To set the tab order for TLFTextField instances, cast the display object child of the TLFTextField as an InteractiveObject, then set the `tabIndex` property. For example:

    	 InteractiveObject(tlfInstance.getChildAt(1)).tabIndex = 3;

To reverse the tab order from the default setting for three instances of a TLFTextField object (`tlfInstance1`, `tlfInstance2` and `tlfInstance3`), use:

    	 InteractiveObject(tlfInstance1.getChildAt(1)).tabIndex = 3;
    	 InteractiveObject(tlfInstance2.getChildAt(1)).tabIndex = 2;
    	 InteractiveObject(tlfInstance3.getChildAt(1)).tabIndex = 1;

Implementation
`public function get tabIndex():int`
`public function set tabIndex(value:int):void`
Constructor Detail

### InteractiveObject

()
Constructor

`public function InteractiveObject()`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Calling the `new InteractiveObject()` constructor throws an `ArgumentError` exception. You can, however, call constructors for the following subclasses of InteractiveObject:

- `new SimpleButton()`
- `new TextField()`
- `new Loader()`
- `new Sprite()`
- `new MovieClip()`

Method Detail

### requestSoftKeyboard

()
method

`public function requestSoftKeyboard():Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.2, AIR 2.6

Raises a virtual keyboard.

Calling this method focuses the InteractiveObject instance and raises the soft keyboard, if necessary. The `needsSoftKeyboard` must also be `true`. A keyboard is not raised if a hardware keyboard is available, or if the client system does not support virtual keyboards.

Note: This method is not supported in AIR applications on iOS.

Returns

| `Boolean` — A value of `true` means that the soft keyboard request was granted; `false` means that the soft keyboard was not raised.

Related API Elements

needsSoftKeyboard
Event Detail

### clear

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event.CLEAR`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4

Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu. This event is dispatched to the object that currently has focus. If the object that currently has focus is a TextField, the default behavior of this event is to cause any currently selected text in the text field to be deleted.

The `Event.CLEAR` constant defines the value of the `type` property of a `clear` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `false`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`target` | Any InteractiveObject instance with a listener registered for the `clear` event.

Note: TextField objects do not dispatch `clear`, `copy`, `cut`, `paste`, or `selectAll` events. TextField objects always include Cut, Copy, Paste, Clear, and Select All commands in the context menu. You cannot remove these commands from the context menu for TextField objects. For TextField objects, selecting these commands (or their keyboard equivalents) does not generate `clear`, `copy`, `cut`, `paste`, or `selectAll` events. However, other classes that extend the InteractiveObject class, including components built using the Flash Text Engine (FTE), will dispatch these events in response to user actions such as keyboard shortcuts and context menus.

### click

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.CLICK`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when a user presses and releases the main button of the user's pointing device over the same InteractiveObject. For a click event to occur, it must always follow this series of events in the order of occurrence: mouseDown event, then mouseUp. The target object must be identical for both of these events; otherwise the `click` event does not occur. Any number of other mouse events can occur at any time between the `mouseDown` or `mouseUp` events; the `click` event still occurs.

Defines the value of the `type` property of a `click` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | For click events, this value is always `false`.
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### contextMenu

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.CONTEXT_MENU`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0

Dispatched when a user gesture triggers the context menu associated with this interactive object in an AIR application.

The `MouseEvent.CONTEXT_MENU` constant defines the value of the `type` property of a `contextMenu` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the right mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`clickCount` | Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

Related API Elements

contextMenu

### copy

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event.COPY`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when the user activates the platform-specific accelerator key combination for a copy operation or selects 'Copy' from the text context menu. This event is dispatched to the object that currently has focus. If the object that currently has focus is a TextField, the default behavior of this event is to cause any currently selected text in the text field to be copied to the clipboard.

Defines the value of the `type` property of a `copy` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `false`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`target` | Any InteractiveObject instance with a listener registered for the `copy` event.

Note: TextField objects do not dispatch `clear`, `copy`, `cut`, `paste`, or `selectAll` events. TextField objects always include Cut, Copy, Paste, Clear, and Select All commands in the context menu. You cannot remove these commands from the context menu for TextField objects. For TextField objects, selecting these commands (or their keyboard equivalents) does not generate `clear`, `copy`, `cut`, `paste`, or `selectAll` events. However, other classes that extend the InteractiveObject class, including components built using the Flash Text Engine (FTE), will dispatch these events in response to user actions such as keyboard shortcuts and context menus.

### cut

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event.CUT`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when the user activates the platform-specific accelerator key combination for a cut operation or selects 'Cut' from the text context menu. This event is dispatched to the object that currently has focus. If the object that currently has focus is a TextField, the default behavior of this event is to cause any currently selected text in the text field to be cut to the clipboard.

Defines the value of the `type` property of a `cut` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `false`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`target` | Any InteractiveObject instance with a listener registered for the `cut` event.

Note: TextField objects do not dispatch `clear`, `copy`, `cut`, `paste`, or `selectAll` events. TextField objects always include Cut, Copy, Paste, Clear, and Select All commands in the context menu. You cannot remove these commands from the context menu for TextField objects. For TextField objects, selecting these commands (or their keyboard equivalents) does not generate `clear`, `copy`, `cut`, `paste`, or `selectAll` events. However, other classes that extend the InteractiveObject class, including components built using the Flash Text Engine (FTE), will dispatch these events in response to user actions such as keyboard shortcuts and context menus.

### doubleClick

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.DOUBLE_CLICK`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Dispatched when a user presses and releases the main button of a pointing device twice in rapid succession over the same InteractiveObject when that object's `doubleClickEnabled` flag is set to `true`. For a `doubleClick` event to occur, it must immediately follow the following series of events: `mouseDown`, `mouseUp`, `click`, `mouseDown`, `mouseUp`. All of these events must share the same target as the `doubleClick` event. The second click, represented by the second `mouseDown` and `mouseUp` events, must occur within a specific period of time after the `click` event. The allowable length of this period varies by operating system and can often be configured by the user. If the target is a selectable text field, the word under the pointer is selected as the default behavior. If the target InteractiveObject does not have its `doubleClickEnabled` flag set to `true` it receives two `click` events.

The `doubleClickEnabled` property defaults to `false`.

The double-click text selection behavior of a TextField object is not related to the `doubleClick` event. Use `TextField.doubleClickEnabled` to control TextField selections.

Defines the value of the `type` property of a `doubleClick` event object. The `doubleClickEnabled` property must be `true` for an object to generate the `doubleClick` event.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | For double-click events, this value is always `false`.
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

Related API Elements

doubleClickEnabled

### focusIn

Event

Event Object Type: `flash.events.FocusEvent`
property FocusEvent.type = `flash.events.FocusEvent.FOCUS_IN`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched after a display object gains focus. This situation happens when a user highlights the object with a pointing device or keyboard navigation. The recipient of such focus is called the target object of this event, while the corresponding InteractiveObject instance that lost focus because of this change is called the related object. A reference to the related object is stored in the receiving object's `relatedObject` property. The `shiftKey` property is not used. This event follows the dispatch of the previous object's `focusOut` event.

Defines the value of the `type` property of a `focusIn` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`keyCode` | 0; applies only to `keyFocusChange` events.
`relatedObject` | The complementary InteractiveObject instance that is affected by the change in focus.
`shiftKey` | `false`; applies only to `keyFocusChange` events.
`target` | The InteractiveObject instance that has just received focus. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`direction` | The direction from which focus was assigned. This property reports the value of the `direction` parameter of the `assignFocus()` method of the stage. If the focus changed through some other means, the value will always be `FocusDirection.NONE`. Applies only to `focusIn` events. For all other focus events the value will be `FocusDirection.NONE`.

### focusOut

Event

Event Object Type: `flash.events.FocusEvent`
property FocusEvent.type = `flash.events.FocusEvent.FOCUS_OUT`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched after a display object loses focus. This happens when a user highlights a different object with a pointing device or keyboard navigation. The object that loses focus is called the target object of this event, while the corresponding InteractiveObject instance that receives focus is called the related object. A reference to the related object is stored in the target object's `relatedObject` property. The `shiftKey` property is not used. This event precedes the dispatch of the `focusIn` event by the related object.

Defines the value of the `type` property of a `focusOut` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`keyCode` | 0; applies only to `keyFocusChange` events.
`relatedObject` | The complementary InteractiveObject instance that is affected by the change in focus.
`shiftKey` | `false`; applies only to `keyFocusChange` events.
`target` | The InteractiveObject instance that has just lost focus. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### gestureDirectionalTap

Event

Event Object Type: `flash.events.TransformGestureEvent`
property TransformGestureEvent.type = `flash.events.TransformGestureEvent.GESTURE_DIRECTIONAL_TAP`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 24, Flash Lite 4

Dispatched when the user creates a point of contact along the edge of the touch surface with an InteractiveObject instance, (such as tapping along the edge of the touch surface on Siri Remote for Apple TV) Some devices might also interpret this contact as a combination of several touch events, as well.

Specifically, if a user touches a finger over an InteractiveObject, and then moves the fingers away, the InteractiveObject instance can dispatch a `touchBegin` event and a `touchEnd` event (among others), as well as the `gestureDirectionalTap` event, or all if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `touchBegin` event, then the same event handler will run on a touch-enabled device. However, if you choose to handle the `gestureDirectionalTap` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a gesture event than a touch event. But flash.ui.Multitouch class decides whether touch event or gesture event will get triggered.

When handling the properties of the event object, note that the `localX` and `localY` properties are set to the primary point of contact(For Apple TV it is centre of the screen). The `offsetX` and `offsetY` properties correspond to the direction of the gesture.

Note: This API only supports a single-finger directional tap.

Defines the value of the `type` property of a `GESTURE_DIRECTIONAL_TAP` touch event object.

The dispatched TransformGestureEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`phase` | The current phase in the event flow. For swipe events, this value is always `all` corresponding to the value `GesturePhase.ALL` once the event is dispatched.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.For directional tap gestures this value is centre of the screen.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.For directional tap gestures this value is centre of the screen.
`scaleX` | The horizontal scale of the display object. For directional tap gestures this value is `1`
`scaleY` | The vertical scale of the display object. For directional tap gestures this value is `1`
`rotation` | The current rotation angle, in degrees, of the display object along the z-axis. For directional tap gestures this value is `0`
`offsetX` | Indicates horizontal direction: 1 for right and -1 for left.
`offsetY` | Indicates vertical direction: 1 for down and -1 for up.
`velocity` | Indicates velocity of the swipe gesture in pixels per second (AIR only).
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

Related API Elements

flash.ui.Multitouch

### gestureLongPress

Event

Event Object Type: `flash.events.TapGestureEvent`
property TapGestureEvent.type = `flash.events.GestureEvent.GESTURE_LONG_PRESS`

Language Version: | ActionScript 3.0

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

Dispatched when the user presses two points of contact over the same InteractiveObject instance on a touch-enabled device (such as presses and releases two fingers over a display object on a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a `doubleClick` event.

Specifically, if a user taps two fingers over an InteractiveObject, the InteractiveObject instance can dispatch a `doubleClick` event or a `gestureTwoFingerTap` event, or both if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `doubleClick` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `gestureTwoFingerTap` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Related API Elements

doubleClick event
flash.ui.Multitouch

### gesturePan

Event

Event Object Type: `flash.events.TransformGestureEvent`
property TransformGestureEvent.type = `flash.events.TransformGestureEvent.GESTURE_PAN`

Language Version: | ActionScript 3.0

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

Dispatched when the user moves a point of contact over the InteractiveObject instance on a touch-enabled device (such as moving a finger from left to right over a display object on a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a `mouseOver` event and as a `touchOver` event.

Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can dispatch a `mouseOver` event or a `touchOver` event or a `gesturePan` event, or all if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `mouseOver` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `gesturePan` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `GESTURE_PAN` touch event object.

The dispatched TransformGestureEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`phase` | The current phase in the event flow; a value from the GesturePhase class.
`localX` | The horizontal coordinate at which the event occurred relative to the containing display object.
`localY` | The vertical coordinate at which the event occurred relative to the containing display object.
`scaleX` | The horizontal scale of the display object since the previous gesture event. For pan gestures this value is `1`.
`scaleY` | The vertical scale of the display object since the previous gesture event. For pan gestures this value is `1`.
`rotation` | The current rotation angle, in degrees, of the display object along the z-axis, since the previous gesture event. For pan gestures this value is `0`.
`offsetX` | The horizontal translation of the display object from its position at the previous gesture event.
`offsetY` | The vertical translation of the display object from its position at the previous gesture event.
`velocity` | The velocity of the gesture event in pixels per second (AIR only). For pan gesture this value is `0`
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

Example ( How to use this example )
The following example shows event handling for the `GESTURE_PAN` events. While the user performs a pan gesture on the touch-enabled device, myTextField populates with the current phase.
Copy

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    var mySprite = new Sprite();
    mySprite.addEventListener(TransformGestureEvent.GESTURE_PAN , onPan);
    mySprite.graphics.beginFill(0x336699);
    mySprite.graphics.drawRect(0, 0, 100, 80);
    var myTextField = new TextField();
    myTextField.y = 200;
    addChild(mySprite);
    addChild(myTextField);

    function onPan(evt:TransformGestureEvent):void {

        evt.target.localX++;

        if (evt.phase==GesturePhase.BEGIN) {
            myTextField.text = "Begin";
        }
        if (evt.phase==GesturePhase.UPDATE) {
            myTextField.text = "Update";
        }
        if (evt.phase==GesturePhase.END) {
            myTextField.text = "End";
        }
    }

Related API Elements

mouseOver event
touchOver event
flash.ui.Multitouch

### gestureRotate

Event

Event Object Type: `flash.events.TransformGestureEvent`
property TransformGestureEvent.type = `flash.events.TransformGestureEvent.GESTURE_ROTATE`

Language Version: | ActionScript 3.0

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

Dispatched when the user performs a rotation gesture at a point of contact with an InteractiveObject instance (such as touching two fingers and rotating them over a display object on a mobile phone or tablet with a touch screen). Two-finger rotation is a common rotation gesture, but each device and operating system can have its own requirements to indicate rotation. Some devices might also interpret this contact as a combination of several mouse events, as well.

Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can dispatch a `mouseOver` event and a `click` event (among others), in addition to the `gestureRotate` event, or all if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `mouseOver` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `gestureRotate` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

When handling the properties of the event object, note that the `localX` and `localY` properties are set to the primary point of contact. The `offsetX` and `offsetY` properties are the distance to the point of contact where the rotation gesture is complete.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `GESTURE_ROTATE` touch event object.

During this event, the `rotation` property contains the rotation angle. The rotation values are as follows:

- 0 to 180 degrees for clockwise direction
- - 180 to 0 degrees for counter-clockwise direction

The dispatched TransformGestureEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`phase` | The current phase in the event flow; a value from the GesturePhase class.
`localX` | The horizontal coordinate at which the event occurred relative to the containing display object.
`localY` | The vertical coordinate at which the event occurred relative to the containing display object.
`scaleX` | The horizontal scale of the display object since the previous gesture event.
`scaleY` | The vertical scale of the display object since the previous gesture event.
`rotation` | The current rotation angle, in degrees, of the display object along the z-axis, since the previous gesture event.
`offsetX` | The horizontal translation of the display object from its position at the previous gesture event.
`offsetY` | The vertical translation of the display object from its position at the previous gesture event.
`velocity` | The velocity of the gesture event in pixels per second (AIR only). For rotate gesture this value is `0`
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

Example ( How to use this example )
The following example shows event handling for the `GESTURE_ROTATE` events. While the user performs a rotation gesture on the touch-enabled device, mySprite rotates and myTextField populates with the current phase.
Copy

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    var mySprite = new Sprite();
    mySprite.addEventListener(TransformGestureEvent.GESTURE_ROTATE , onRotate );
    mySprite.graphics.beginFill(0x336699);
    mySprite.graphics.drawRect(0, 0, 100, 80);
    var myTextField = new TextField();
    myTextField.y = 200;
    addChild(mySprite);
    addChild(myTextField);

    function onRotate(evt:TransformGestureEvent):void {

        evt.target.rotation -= 45;

        if (evt.phase==GesturePhase.BEGIN) {
            myTextField.text = "Begin";
        }
        if (evt.phase==GesturePhase.UPDATE) {
            myTextField.text = "Update";
        }
        if (evt.phase==GesturePhase.END) {
            myTextField.text = "End";
        }
    }

Related API Elements

mouseOver event
touchOver event
flash.ui.Multitouch

### gestureSwipe

Event

Event Object Type: `flash.events.TransformGestureEvent`
property TransformGestureEvent.type = `flash.events.TransformGestureEvent.GESTURE_SWIPE`

Language Version: | ActionScript 3.0

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

Dispatched when the user performs a swipe gesture at a point of contact with an InteractiveObject instance (such as touching three fingers to a screen and then moving them in parallel over a display object on a mobile phone or tablet with a touch screen). Moving several fingers in parallel is a common swipe gesture, but each device and operating system can have its own requirements for a swipe. Some devices might also interpret this contact as a combination of several mouse events, as well.

Specifically, if a user moves a finger over an InteractiveObject, and then moves the fingers together, the InteractiveObject instance can dispatch a `rollOver` event and a `rollOut` event (among others), in addition to the `gestureSwipe` event, or all if the current environment supports it. Choose how you want to handle the user interaction. If you choose to handle the `rollOver` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `gestureSwipe` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

When handling the properties of the event object, note that the `localX` and `localY` properties are set to the primary point of contact. The `offsetX` and `offsetY` properties are the distance to the point of contact where the swipe gesture is complete.

Note: While some devices using the Mac OS operating system can interpret a four-finger swipe, this API only supports a three-finger swipe.

Defines the value of the `type` property of a `GESTURE_SWIPE` touch event object.

The dispatched TransformGestureEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`phase` | The current phase in the event flow. For swipe events, this value is always `all` corresponding to the value `GesturePhase.ALL` once the event is dispatched.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`scaleX` | The horizontal scale of the display object. For swipe gestures this value is `1`
`scaleY` | The vertical scale of the display object. For swipe gestures this value is `1`
`rotation` | The current rotation angle, in degrees, of the display object along the z-axis. For swipe gestures this value is `0`
`offsetX` | Indicates horizontal direction: 1 for right and -1 for left.
`offsetY` | Indicates vertical direction: 1 for down and -1 for up.
`velocity` | Indicates velocity of the swipe gesture in pixels per second (AIR only). For rest, this value is `0`
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

Example ( How to use this example )
The following example shows event handling for the `GESTURE_SWIPE` events. While the user performs a swipe gesture on the touch-enabled device, myTextField populates with the phase `all`, which is the only phase for swipe events.
Copy

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    var mySprite = new Sprite();
    mySprite.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipe);
    mySprite.graphics.beginFill(0x336699);
    mySprite.graphics.drawRect(0, 0, 100, 80);
    var myTextField = new TextField();
    myTextField.y = 200;
    addChild(mySprite);
    addChild(myTextField);

    function onSwipe(evt:TransformGestureEvent):void {

        if (evt.offsetX == 1 ) {
        myTextField.text = "right";
        }
        if (evt.offsetY == -1) {
        myTextField.text = "up";
        }
        myTextField.text = evt.phase;

    }

Related API Elements

rollOver event
touchOver event
flash.ui.Multitouch

### gestureTap

Event

Event Object Type: `flash.events.TapGestureEvent`
property TapGestureEvent.type = `flash.events.PressAndTapGestureEvent.GESTURE_TAP`

Language Version: | ActionScript 3.0

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

Dispatched when the user creates a point of contact with an InteractiveObject instance, then taps on a touch-enabled device (such as placing several fingers over a display object to open a menu and then taps one finger to select a menu item on a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a combination of several mouse events, as well.

Specifically, if a user moves a finger over an InteractiveObject, and then provides a secondary tap, the InteractiveObject instance can dispatch a `mouseOver` event and a `click` event (among others) as well as the `gesturePressAndTap` event, or all if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `mouseOver` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `gesturePressAndTap` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

When handling the properties of the event object, note that the `localX` and `localY` properties are set to the primary point of contact (the "push"). The `offsetX` and `offsetY` properties are the distance to the secondary point of contact (the "tap").

Related API Elements

mouseOver event
touchOver event
flash.ui.Multitouch

### gestureZoom

Event

Event Object Type: `flash.events.TransformGestureEvent`
property TransformGestureEvent.type = `flash.events.TransformGestureEvent.GESTURE_ZOOM`

Language Version: | ActionScript 3.0

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

Dispatched when the user performs a zoom gesture at a point of contact with an InteractiveObject instance (such as touching two fingers to a screen and then quickly spreading the fingers apart over a display object on a mobile phone or tablet with a touch screen). Moving fingers apart is a common zoom gesture, but each device and operating system can have its own requirements to indicate zoom. Some devices might also interpret this contact as a combination of several mouse events, as well.

Specifically, if a user moves a finger over an InteractiveObject, and then moves the fingers apart, the InteractiveObject instance can dispatch a `mouseOver` event and a `click` event (among others), in addition to the `gestureZoom` event, or all if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `mouseOver` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `gestureZoom` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

When handling the properties of the event object, note that the `localX` and `localY` properties are set to the primary point of contact. The `offsetX` and `offsetY` properties are the distance to the point of contact where the zoom gesture is complete.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `GESTURE_ZOOM` touch event object.

The dispatched TransformGestureEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`phase` | The current phase in the event flow; a value from the GesturePhase class.
`localX` | The horizontal coordinate at which the event occurred relative to the containing display object.
`localY` | The vertical coordinate at which the event occurred relative to the containing display object.
`scaleX` | The horizontal scale of the display object since the previous gesture event.
`scaleY` | The vertical scale of the display object since the previous gesture event.
`rotation` | The current rotation angle, in degrees, of the display object along the z-axis, since the previous gesture event.
`offsetX` | The horizontal translation of the display object from its position at the previous gesture event.
`offsetY` | The vertical translation of the display object from its position at the previous gesture event.
`velocity` | The velocity of the gesture event in pixels per second (AIR only). For zoom gesture this value is `0`
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

Example ( How to use this example )
The following example shows event handling for the `GESTURE_ZOOM` events. While the user performs a zoom gesture on the touch-enabled device, myTextField populates with the current phase.
Copy

    Multitouch.inputMode = MultitouchInputMode.GESTURE;

    var mySprite = new Sprite();
    mySprite.addEventListener(TransformGestureEvent.GESTURE_ZOOM , onZoom);
    mySprite.graphics.beginFill(0x336699);
    mySprite.graphics.drawRect(0, 0, 100, 80);
    var myTextField = new TextField();
    myTextField.y = 200;
    addChild(mySprite);
    addChild(myTextField);

    function onZoom(evt:TransformGestureEvent):void {

        evt.target.scaleX++;

        if (evt.phase==GesturePhase.BEGIN) {
            myTextField.text = "Begin";
        }
        if (evt.phase==GesturePhase.UPDATE) {
            myTextField.text = "Update";
        }
        if (evt.phase==GesturePhase.END) {
            myTextField.text = "End";
        }
    }

Related API Elements

mouseOver event
touchOver event
flash.ui.Multitouch

### imeStartComposition

Event

Event Object Type: `flash.events.IMEEvent`

Runtime Versions: | Flash Lite 4

This event is dispatched to any client app that supports inline input with an IME

### keyDown

Event

Event Object Type: `flash.events.KeyboardEvent`
property KeyboardEvent.type = `flash.events.KeyboardEvent.KEY_DOWN`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when the user presses a key. Mappings between keys and specific characters vary by device and operating system. This event type is generated after such a mapping occurs but before the processing of an input method editor (IME). IMEs are used to enter characters, such as Chinese ideographs, that the standard QWERTY keyboard is ill-equipped to produce. This event occurs before the `keyUp` event.

In AIR, canceling this event prevents the character from being entered into a text field.

The `KeyboardEvent.KEY_DOWN` constant defines the value of the `type` property of a `keyDown` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `true` in AIR, `false` in Flash Player; in AIR, canceling this event prevents the character from being entered into a text field.
`charCode` | The character code value of the key pressed or released.
`commandKey` | `true` on Mac if the Command key is active. Otherwise, `false`
`controlKey` | `true` on Windows and Linux if the Ctrl key is active. `true` on Mac if either the Control key is active. Otherwise, `false`
`ctrlKey` | `true` on Windows and Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`keyCode` | The key code value of the key pressed or released.
`keyLocation` | The location of the key on the keyboard.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`target` | The InteractiveObject instance with focus. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

More examples

Capturing keyboard input

### keyFocusChange

Event

Event Object Type: `flash.events.FocusEvent`
property FocusEvent.type = `flash.events.FocusEvent.KEY_FOCUS_CHANGE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when the user attempts to change focus by using keyboard navigation. The default behavior of this event is to change the focus and dispatch the corresponding `focusIn` and `focusOut` events.

This event is dispatched to the object that currently has focus. The related object for this event is the InteractiveObject instance that receives focus if you do not prevent the default behavior. You can prevent the change in focus by calling the `preventDefault()` method in an event listener that is properly registered with the target object. Focus changes and `focusIn` and `focusOut` events are dispatched by default.

Defines the value of the `type` property of a `keyFocusChange` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `true`; call the `preventDefault()` method to cancel default behavior.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`keyCode` | The key code value of the key pressed to trigger a `keyFocusChange` event.
`relatedObject` | The complementary InteractiveObject instance that is affected by the change in focus.
`shiftKey` | `true` if the Shift key modifier is activated; `false` otherwise.
`target` | The InteractiveObject instance that currently has focus. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### keyUp

Event

Event Object Type: `flash.events.KeyboardEvent`
property KeyboardEvent.type = `flash.events.KeyboardEvent.KEY_UP`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when the user releases a key. Mappings between keys and specific characters vary by device and operating system. This event type is generated after such a mapping occurs but before the processing of an input method editor (IME). IMEs are used to enter characters, such as Chinese ideographs, that the standard QWERTY keyboard is ill-equipped to produce. This event occurs after a `keyDown` event and has the following characteristics:

The `KeyboardEvent.KEY_UP` constant defines the value of the `type` property of a `keyUp` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`charCode` | Contains the character code value of the key pressed or released.
`commandKey` | `true` on Mac if the Command key is active. Otherwise, `false`
`controlKey` | `true` on Windows and Linux if the Ctrl key is active. `true` on Mac if either the Control key is active. Otherwise, `false`
`ctrlKey` | `true` on Windows if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`keyCode` | The key code value of the key pressed or released.
`keyLocation` | The location of the key on the keyboard.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`target` | The InteractiveObject instance with focus. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### middleClick

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.MIDDLE_CLICK`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched when a user presses and releases the middle button of the user's pointing device over the same InteractiveObject. For a `middleClick` event to occur, it must always follow this series of events in the order of occurrence: `middleMouseDown` event, then `middleMouseUp`. The target object must be identical for both of these events; otherwise the `middleClick` event does not occur. Any number of other mouse events can occur at any time between the `middleMouseDown` or `middleMouseUp` events; the `middleClick` event still occurs.

Defines the value of the `type` property of a `middleClick` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | For middle-click events, this property is always `false`.
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### middleMouseDown

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.MIDDLE_MOUSE_DOWN`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched when a user presses the middle pointing device button over an InteractiveObject instance.

Defines the value of the `type` property of a `middleMouseDown` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the middle mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`clickCount` | Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### middleMouseUp

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.MIDDLE_MOUSE_UP`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched when a user releases the pointing device button over an InteractiveObject instance.

Defines the value of the `type` property of a `middleMouseUp` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the middle mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`clickCount` | Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### mouseDown

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.MOUSE_DOWN`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when a user presses the pointing device button over an InteractiveObject instance. If the target is a SimpleButton instance, the SimpleButton instance displays the `downState` display object as the default behavior. If the target is a selectable text field, the text field begins selection as the default behavior.

Defines the value of the `type` property of a `mouseDown` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the primary mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows and Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`clickCount` | Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### mouseFocusChange

Event

Event Object Type: `flash.events.FocusEvent`
property FocusEvent.type = `flash.events.FocusEvent.MOUSE_FOCUS_CHANGE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when the user attempts to change focus by using a pointer device. The default behavior of this event is to change the focus and dispatch the corresponding `focusIn` and `focusOut` events.

This event is dispatched to the object that currently has focus. The related object for this event is the InteractiveObject instance that receives focus if you do not prevent the default behavior. You can prevent the change in focus by calling `preventDefault()` in an event listener that is properly registered with the target object. The `shiftKey` property is not used. Focus changes and `focusIn` and `focusOut` events are dispatched by default.

Defines the value of the `type` property of a `mouseFocusChange` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `true`; call the `preventDefault()` method to cancel default behavior.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`keyCode` | 0; applies only to `keyFocusChange` events.
`relatedObject` | The complementary InteractiveObject instance that is affected by the change in focus.
`shiftKey` | `false`; applies only to `keyFocusChange` events.
`target` | The InteractiveObject instance that currently has focus. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### mouseMove

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.MOUSE_MOVE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when a user moves the pointing device while it is over an InteractiveObject. If the target is a text field that the user is selecting, the selection is updated as the default behavior.

Defines the value of the `type` property of a `mouseMove` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the primary mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### mouseOut

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.MOUSE_OUT`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when the user moves a pointing device away from an InteractiveObject instance. The event target is the object previously under the pointing device. The `relatedObject` is the object the pointing device has moved to. If the target is a SimpleButton instance, the button displays the `upState` display object as the default behavior.

The `mouseOut` event is dispatched each time the mouse leaves the area of any child object of the display object container, even if the mouse remains over another child object of the display object container. This is different behavior than the purpose of the `rollOut` event, which is to simplify the coding of rollover behaviors for display object containers with children. When the mouse leaves the area of a display object or the area of any of its children to go to an object that is not one of its children, the display object dispatches the `rollOut` event.The `rollOut` events are dispatched consecutively up the parent chain of the object, starting with the object and ending with the highest parent that is neither the root nor an ancestor of the `relatedObject`.

Defines the value of the `type` property of a `mouseOut` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the primary mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`relatedObject` | The display list object to which the pointing device now points.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### mouseOver

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.MOUSE_OVER`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when the user moves a pointing device over an InteractiveObject instance. The `relatedObject` is the object that was previously under the pointing device. If the target is a SimpleButton instance, the object displays the `overState` or `upState` display object, depending on whether the mouse button is down, as the default behavior.

The `mouseOver` event is dispatched each time the mouse enters the area of any child object of the display object container, even if the mouse was already over another child object of the display object container. This is different behavior than the purpose of the `rollOver` event, which is to simplify the coding of rollout behaviors for display object containers with children. When the mouse enters the area of a display object or the area of any of its children from an object that is not one of its children, the display object dispatches the `rollOver` event. The `rollOver` events are dispatched consecutively down the parent chain of the object, starting with the highest parent that is neither the root nor an ancestor of the `relatedObject` and ending with the object.

Defines the value of the `type` property of a `mouseOver` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the primary mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`relatedObject` | The display list object to which the pointing device was pointing.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### mouseUp

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.MOUSE_UP`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when a user releases the pointing device button over an InteractiveObject instance. If the target is a SimpleButton instance, the object displays the `upState` display object. If the target is a selectable text field, the text field ends selection as the default behavior.

Defines the value of the `type` property of a `mouseUp` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the primary mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`clickCount` | Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### mouseWheel

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.MOUSE_WHEEL`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Dispatched when a mouse wheel is spun over an InteractiveObject instance. If the target is a text field, the text scrolls as the default behavior. Only available on Microsoft Windows operating systems.

Defines the value of the `type` property of a `mouseWheel` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the primary mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`delta` | The number of lines that that each notch on the mouse wheel represents.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### nativeDragComplete

Event

Event Object Type: `flash.events.NativeDragEvent`
property NativeDragEvent.type = `flash.events.NativeDragEvent.NATIVE_DRAG_COMPLETE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture.

The event's dropAction property indicates the action set by the drag target object; a value of "none" (`DragActions.NONE`) indicates that the drop was canceled or was not accepted.

The `nativeDragComplete` event handler is a convenient place to update the state of the initiating display object, for example, by removing an item from a list (on a drag action of "move"), or by changing the visual properties.

NativeDragEvent.NATIVE_DRAG_COMPLETE defines the value of the `type` property of a `nativeDragComplete` event object.

This event has the following properties:

Property | Value
--- | ---
`allowedActions` | The NativeDragOptions object specifying the actions relevant to this drag operation.
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`clipboard` | The Clipboard object containing the dragged data.
`dropAction` | The action chosen by the drop target (or `none` if no action was set).

### nativeDragDrop

Event

Event Object Type: `flash.events.NativeDragEvent`
property NativeDragEvent.type = `flash.events.NativeDragEvent.NATIVE_DRAG_DROP`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched by the target InteractiveObject when a dragged object is dropped on it and the drop has been accepted with a call to DragManager.acceptDragDrop().

Access the dropped data using the event object `clipboard` property.

The handler for this event should set the `DragManager.dropAction` property to provide feedback to the initiator object about which drag action was taken. If no value is set, the DragManager will select a default value from the list of allowed actions.

NativeDragEvent.NATIVE_DRAG_DROP defines the value of the `type` property of a `nativeDragDrop` event object.

This event has the following properties:

Property | Value
--- | ---
`allowedActions` | The NativeDragOptions object specifying the actions relevant to this drag operation.
`bubbles` | `true`
`cancelable` | `true`; canceling this event cancels the drag operation.
`clipboard` | The Clipboard object containing the dragged data. The clipboard can be read even if the object dispatching this event is not in the same security domain as the initiator.
`dropAction` | The action chosen by the drop target (or `none` if no action was set).

### nativeDragEnter

Event

Event Object Type: `flash.events.NativeDragEvent`
property NativeDragEvent.type = `flash.events.NativeDragEvent.NATIVE_DRAG_ENTER`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched by an InteractiveObject when a drag gesture enters its boundary.

Handle either the `nativeDragEnter` or `nativeDragOver` events to allow the display object to become the drop target.

To determine whether the dispatching display object can accept the drop, check the suitability of the data in `clipboard` property of the event object, and the allowed drag actions in the `allowedActions` property.

NativeDragEvent.NATIVE_DRAG_ENTER defines the value of the `type` property of a `nativeDragEnter` event object.

This event has the following properties:

Property | Value
--- | ---
`allowedActions` | The NativeDragOptions object specifying the actions relevant to this drag operation.
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`clipboard` | The Clipboard object containing the dragged data. The clipboard can be read only if the object dispatching this event is in the same security domain as the initiator.
`dropAction` | The action chosen by the drop target (or `none` if no action was set).

### nativeDragExit

Event

Event Object Type: `flash.events.NativeDragEvent`
property NativeDragEvent.type = `flash.events.NativeDragEvent.NATIVE_DRAG_EXIT`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched by an InteractiveObject when a drag gesture leaves its boundary.

NativeDragEvent.NATIVE_DRAG_EXIT defines the value of the `type` property of a `nativeDragExit` event object.

This event has the following properties:

Property | Value
--- | ---
`allowedActions` | The NativeDragOptions object specifying the actions relevant to this drag operation.
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`clipboard` | The Clipboard object containing the dragged data. The clipboard can be read only if the object dispatching this event is in the same security domain as the initiator.
`dropAction` | The action chosen by the drop target (or `none` if no action was set).

### nativeDragOver

Event

Event Object Type: `flash.events.NativeDragEvent`
property NativeDragEvent.type = `flash.events.NativeDragEvent.NATIVE_DRAG_OVER`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched by an InteractiveObject continually while a drag gesture remains within its boundary.

`nativeDragOver` events are dispatched whenever the mouse is moved. On Windows and Mac, they are also dispatched on a short timer interval even when the mouse has not moved.

Handle either the `nativeDragOver` or `nativeDragEnter` events to allow the display object to become the drop target.

To determine whether the dispatching display object can accept the drop, check the suitability of the data in `clipboard` property of the event object, and the allowed drag actions in the `allowedActions` property.

NativeDragEvent.NATIVE_DRAG_OVER defines the value of the `type` property of a `nativeDragOver` event object.

This event has the following properties:

Property | Value
--- | ---
`allowedActions` | The NativeDragOptions object specifying the actions relevant to this drag operation.
`bubbles` | `true`
`cancelable` | `true`; canceling this event cancels the drag operation.
`clipboard` | The Clipboard object containing the dragged data. The clipboard can be read only if the object dispatching this event is in the same security domain as the initiator.
`dropAction` | The action chosen by the drop target (or `none` if no action was set).

### nativeDragStart

Event

Event Object Type: `flash.events.NativeDragEvent`
property NativeDragEvent.type = `flash.events.NativeDragEvent.NATIVE_DRAG_START`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched at the beginning of a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call.

NativeDragEvent.NATIVE_DRAG_START defines the value of the `type` property of a `nativeDragStart` event object.

This event has the following properties:

Property | Value
--- | ---
`allowedActions` | The NativeDragOptions object specifying the actions relevant to this drag operation.
`bubbles` | `true`
`cancelable` | `true`; canceling this event cancels the drag operation.
`clipboard` | The Clipboard object containing the dragged data.
`dropAction` | The action chosen by the drop target (or `none` if no action was set).

### nativeDragUpdate

Event

Event Object Type: `flash.events.NativeDragEvent`
property NativeDragEvent.type = `flash.events.NativeDragEvent.NATIVE_DRAG_UPDATE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched during a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call.

`nativeDragUpdate` events are not dispatched on Linux.

NativeDragEvent.NATIVE_DRAG_UPDATE defines the value of the `type` property of a `nativeDragUpdate` event object.

This event has the following properties:

Property | Value
--- | ---
`allowedActions` | The NativeDragOptions object specifying the actions relevant to this drag operation.
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`clipboard` | The Clipboard object containing the dragged data.
`dropAction` | The action chosen by the drop target (or `none` if no action was set).

### paste

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event.PASTE`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when the user activates the platform-specific accelerator key combination for a paste operation or selects 'Paste' from the text context menu. This event is dispatched to the object that currently has focus. If the object that currently has focus is a TextField, the default behavior of this event is to cause the contents of the clipboard to be pasted into the text field at the current insertion point replacing any currently selected text in the text field.

The `Event.PASTE` constant defines the value of the `type` property of a `paste` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true` (`false` for AIR runtime.)
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`target` | Any InteractiveObject instance with a listener registered for the `paste` event.

Note: TextField objects do not dispatch `clear`, `copy`, `cut`, `paste`, or `selectAll` events. TextField objects always include Cut, Copy, Paste, Clear, and Select All commands in the context menu. You cannot remove these commands from the context menu for TextField objects. For TextField objects, selecting these commands (or their keyboard equivalents) does not generate `clear`, `copy`, `cut`, `paste`, or `selectAll` events. However, other classes that extend the InteractiveObject class, including components built using the Flash Text Engine (FTE), will dispatch these events in response to user actions such as keyboard shortcuts and context menus.

### proximityBegin

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.PROXIMITY_BEGIN`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3

Dispatched when the user lowers an active stylus past the proximity detection threshold of the screen.

The typical sequence of events that occurs when a user lowers a stylus to the screen, moves it across the screen, and lifts it away is:

- proximityBegin
- proximityMove
- touchBegin
- touchMove
- touchEnd
- proximityMove
- proximityEnd

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `PROXIMITY_BEGIN` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.
`timestamp` | (AIR only) The timestamp of the event in milliseconds relative to the start of the application.
`touchIntent` | (AIR only) A value from the TouchEventIntent class.
`isTouchPointCanceled` | (AIR only) `true` if the touch event is canceled because of the device's touch-rejection logic.

Related API Elements

flash.ui.Multitouch

### proximityEnd

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.PROXIMITY_END`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3

Dispatched when the user lifts an active stylus above the proximity detection threshold of the screen.

A proximityEnd event is not dispatched when the stylus touches the screen.

The typical sequence of events that occurs when a user lowers a stylus to the screen, moves it across the screen, and lifts it away is:

- proximityBegin
- proximityMove
- touchBegin
- touchMove
- touchEnd
- proximityMove
- proximityEnd

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `PROXIMITY_END` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.
`timestamp` | (AIR only) The timestamp of the event in milliseconds relative to the start of the application.
`touchIntent` | (AIR only) A value from the TouchEventIntent class.
`isTouchPointCanceled` | (AIR only) `true` if the touch event is canceled because of the device's touch-rejection logic.

Related API Elements

flash.ui.Multitouch

### proximityMove

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.PROXIMITY_MOVE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3

Dispatched when the user moves an active stylus over the screen while remaining within the proximity detection threshold.

The typical sequence of events that occurs when a user lowers a stylus to the screen, moves it across the screen, and lifts it away is:

- proximityBegin
- proximityMove
- touchBegin
- touchMove
- touchEnd
- proximityMove
- proximityEnd

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `PROXIMITY_MOVE` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.
`timestamp` | (AIR only) The timestamp of the event in milliseconds relative to the start of the application.
`touchIntent` | (AIR only) A value from the TouchEventIntent class.
`isTouchPointCanceled` | (AIR only) `true` if the touch event is canceled because of the device's touch-rejection logic.

Related API Elements

flash.ui.Multitouch

### proximityOut

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.PROXIMITY_OUT`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3

Dispatched when the user moves an active stylus away from this InteractiveObject while remaining within the proximity detection threshold of the screen.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `PROXIMITY_OUT` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.
`timestamp` | (AIR only) The timestamp of the event in milliseconds relative to the start of the application.
`touchIntent` | (AIR only) A value from the TouchEventIntent class.
`isTouchPointCanceled` | (AIR only) `true` if the touch event is canceled because of the device's touch-rejection logic.

Related API Elements

flash.ui.Multitouch

### proximityOver

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.PROXIMITY_OVER`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3

Dispatched when the user moves an active stylus directly above this InteractiveObject while remaining within the proximity detection threshold of the screen.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `PROXIMITY_OVER` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.
`timestamp` | (AIR only) The timestamp of the event in milliseconds relative to the start of the application.
`touchIntent` | (AIR only) A value from the TouchEventIntent class.
`isTouchPointCanceled` | (AIR only) `true` if the touch event is canceled because of the device's touch-rejection logic.

Related API Elements

flash.ui.Multitouch

### proximityRollOut

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.PROXIMITY_ROLL_OUT`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3

Dispatched when the user moves an active stylus away from this InteractiveObject and any of its children while remaining within the proximity detection threshold of the screen.

The event target is the object previously under the stylus or a parent of that object. The `relatedObject` is the object that the stylus has moved above. The `proximityRollOut` events are dispatched consecutively up the parent chain of the object, starting with the object and ending with the highest parent that is neither the root nor an ancestor of the `relatedObject`.

The purpose of the `proximityRollOut` event is to simplify the coding of rollover behaviors for display object containers with children. When the stylus leaves the area of a display object, including the area of any of its children, to go to an object that is not one of its children, the display object dispatches the `proximityRollOut` event. This is different behavior than that of the `proximityOut` event, which is dispatched each time the mouse leaves the area of any child object of the display object container, even if the mouse remains over another child object of the display object container.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `PROXIMITY_ROLL_OUT` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.
`timestamp` | (AIR only) The timestamp of the event in milliseconds relative to the start of the application.
`touchIntent` | (AIR only) A value from the TouchEventIntent class.
`isTouchPointCanceled` | (AIR only) `true` if the touch event is canceled because of the device's touch-rejection logic.

Related API Elements

flash.ui.Multitouch

### proximityRollOver

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.PROXIMITY_ROLL_OVER`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3

Dispatched when the user moves an active stylus over this InteractiveObject from outside the object's tree of descendents in the display list (while remaining within the proximity detection threshold of the screen).

The event target is the object under the stylus or a parent of that object. The `relatedObject` is the object that was previously under the stylus. The `proximityRollOver` events are dispatched consecutively down the parent chain of the object, starting with the highest parent that is neither the root nor an ancestor of the `relatedObject` and ending with the object.

The purpose of the `proximityRollOver` event is to simplify the coding of rollout behaviors for display object containers with children. When the stylus enters the area above a display object or above any of its children from an object that is not one of its children, the display object dispatches the `proximityRollOver` event. This is different behavior than that of the `proximityOver` event, which is dispatched each time the mouse enters the area of any child object of the display object container, even if the mouse was already over another child object of the display object container.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `PROXIMITY_ROLL_OVER` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.
`timestamp` | (AIR only) The timestamp of the event in milliseconds relative to the start of the application.
`touchIntent` | (AIR only) A value from the TouchEventIntent class.
`isTouchPointCanceled` | (AIR only) `true` if the touch event is canceled because of the device's touch-rejection logic.

Related API Elements

flash.ui.Multitouch

### releaseOutside

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.RELEASE_OUTSIDE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3.3, Flash Player 11.3

Dispatched when a user releases the button on the pointing device after the user first pressed the button over an InteractiveObject instance and then moved the pointing device off of the InteractiveObject instance. If the target is a SimpleButton instance, the object displays the `upState` display object. If the target is a selectable text field, the text field ends selection as the default behavior.

Defines the value of the `type` property of a `releaseOutside` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `false`
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`clickCount` | Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject which pointing device button is pressed over previously and out from the instance and released. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### rightClick

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.RIGHT_CLICK`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched when a user presses and releases the right button of the user's pointing device over the same InteractiveObject. For a `rightClick` event to occur, it must always follow this series of events in the order of occurrence: `rightMouseDown` event, then `rightMouseUp`. The target object must be identical for both of these events; otherwise the `rightClick` event does not occur. Any number of other mouse events can occur at any time between the `rightMouseDown` or `rightMouseUp` events; the `rightClick` event still occurs.

Defines the value of the `type` property of a `rightClick` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | For right-click events, this property is always `false`.
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### rightMouseDown

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.RIGHT_MOUSE_DOWN`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched when a user presses the pointing device button over an InteractiveObject instance.

Defines the value of the `type` property of a `rightMouseDown` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | For right-click events, this property is always `true`.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`clickCount` | Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### rightMouseUp

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.RIGHT_MOUSE_UP`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Lite 4

Dispatched when a user releases the pointing device button over an InteractiveObject instance.

Defines the value of the `type` property of a `rightMouseUp` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `true`
`buttonDown` | `true` if the right mouse button is pressed; `false` otherwise.
`cancelable` | `false`; the default behavior cannot be canceled.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`clickCount` | Count of the number of mouse clicks to indicate whether the event is part of a multi-click sequence.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### rollOut

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.ROLL_OUT`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when the user moves a pointing device away from an InteractiveObject instance. The event target is the object previously under the pointing device or a parent of that object. The `relatedObject` is the object that the pointing device has moved to. The `rollOut` events are dispatched consecutively up the parent chain of the object, starting with the object and ending with the highest parent that is neither the root nor an ancestor of the `relatedObject`.

The purpose of the `rollOut` event is to simplify the coding of rollover behaviors for display object containers with children. When the mouse leaves the area of a display object or the area of any of its children to go to an object that is not one of its children, the display object dispatches the `rollOut` event. This is different behavior than that of the `mouseOut` event, which is dispatched each time the mouse leaves the area of any child object of the display object container, even if the mouse remains over another child object of the display object container.

Defines the value of the `type` property of a `rollOut` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `false`
`buttonDown` | `true` if the primary mouse button is pressed; `false` otherwise.
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`relatedObject` | The display list object to which the pointing device now points.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### rollOver

Event

Event Object Type: `flash.events.MouseEvent`
property MouseEvent.type = `flash.events.MouseEvent.ROLL_OVER`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when the user moves a pointing device over an InteractiveObject instance. The event target is the object under the pointing device or a parent of that object. The `relatedObject` is the object that was previously under the pointing device. The `rollOver` events are dispatched consecutively down the parent chain of the object, starting with the highest parent that is neither the root nor an ancestor of the `relatedObject` and ending with the object.

The purpose of the `rollOver` event is to simplify the coding of rollout behaviors for display object containers with children. When the mouse enters the area of a display object or the area of any of its children from an object that is not one of its children, the display object dispatches the `rollOver` event. This is different behavior than that of the `mouseOver` event, which is dispatched each time the mouse enters the area of any child object of the display object container, even if the mouse was already over another child object of the display object container.

Defines the value of the `type` property of a `rollOver` event object.

This event has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows).
`bubbles` | `false`
`buttonDown` | `true` if the primary mouse button is pressed; `false` otherwise.
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`relatedObject` | The display list object to which the pointing device was pointing.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite, if mouse locking is disabled.
`movementX` | The change in horizontal coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`movementY` | The change in vertical coordinates of the mouse position since the last mouse event, if mouse locking is enabled.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the pointing device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### selectAll

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event.SELECT_ALL`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when the user activates the platform-specific accelerator key combination for a select all operation or selects 'Select All' from the text context menu. This event is dispatched to the object that currently has focus. If the object that currently has focus is a TextField, the default behavior of this event is to cause all the contents of the text field to be selected.

The `Event.SELECT_ALL` constant defines the value of the `type` property of a `selectAll` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `false`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`target` | Any InteractiveObject instance with a listener registered for the `selectAll` event.

Note: TextField objects do not dispatch `clear`, `copy`, `cut`, `paste`, or `selectAll` events. TextField objects always include Cut, Copy, Paste, Clear, and Select All commands in the context menu. You cannot remove these commands from the context menu for TextField objects. For TextField objects, selecting these commands (or their keyboard equivalents) does not generate `clear`, `copy`, `cut`, `paste`, or `selectAll` events. However, other classes that extend the InteractiveObject class, including components built using the Flash Text Engine (FTE), will dispatch these events in response to user actions such as keyboard shortcuts and context menus.

### softKeyboardActivate

Event

Event Object Type: `flash.events.SoftKeyboardEvent`
property SoftKeyboardEvent.type = `flash.events.SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.2, AIR 2.6

Dispatched immediately after the soft keyboard is raised.

The `SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE` constant defines the value of the `type` property SoftKeyboardEvent object when a soft keyboard is displayed. For this event, `cancellable = false`.

This event has the following properties:

Property | Value
--- | ---
`type` | `SOFT_KEYBOARD_ACTIVATE`
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`relatedObjectVal` | A reference to a display list object that is related to the event.
`triggerTypeVal` | Indicates whether the keyboard event was triggered by an application or user.
`currentTarget` | The object that is actively processing the Event object with an event listener.

Related API Elements

flash.events.SoftKeyboardEvent

### softKeyboardActivating

Event

Event Object Type: `flash.events.SoftKeyboardEvent`
property SoftKeyboardEvent.type = `flash.events.SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.2, AIR 2.6

Dispatched immediately before the soft keyboard is raised.

The `SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING` constant defines the value of the `type` property SoftKeyboardEvent object immediately before a soft keyboard is displayed. For this event, `cancellable = true`.

This event has the following properties:

Property | Value
--- | ---
`type` | `SOFT_KEYBOARD_ACTIVATING`
`bubbles` | `true`
`cancelable` | `true` unless the event is dispatched by a StageText object. For StageText objects, the event is not cancellable.
`relatedObjectVal` | A reference to a display list object that is related to the event.
`triggerTypeVal` | Indicates whether the keyboard event was triggered by an application or user.
`currentTarget` | The object that is actively processing the Event object with an event listener.

Related API Elements

flash.events.SoftKeyboardEvent

### softKeyboardDeactivate

Event

Event Object Type: `flash.events.SoftKeyboardEvent`
property SoftKeyboardEvent.type = `flash.events.SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.2, AIR 2.6

Dispatched immediately after the soft keyboard is lowered.

The `SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE` constant defines the value of the `type` property SoftKeyboardEvent object when a soft keyboard is lowered or hidden. For this event, `cancellable = false`.

This event has the following properties:

Property | Value
--- | ---
`type` | `SOFT_KEYBOARD_DEACTIVATE`
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`relatedObjectVal` | A reference to a display list object that is related to the event.
`triggerTypeVal` | Indicates whether the keyboard event was triggered by an application or user.
`currentTarget` | The object that is actively processing the Event object with an event listener.

Related API Elements

flash.events.SoftKeyboardEvent

### tabChildrenChange

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event.TAB_CHILDREN_CHANGE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Dispatched when the value of the object's `tabChildren` flag changes.

The `Event.TAB_CHILDREN_CHANGE` constant defines the value of the `type` property of a `tabChildrenChange` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`target` | The object whose tabChildren flag has changed. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### tabEnabledChange

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event.TAB_ENABLED_CHANGE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Dispatched when the object's `tabEnabled` flag changes.

The `Event.TAB_ENABLED_CHANGE` constant defines the value of the `type` property of a `tabEnabledChange` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`target` | The InteractiveObject whose tabEnabled flag has changed. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### tabIndexChange

Event

Event Object Type: `flash.events.Event`
property Event.type = `flash.events.Event.TAB_INDEX_CHANGE`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9

Dispatched when the value of the object's `tabIndex` property changes.

The `Event.TAB_INDEX_CHANGE` constant defines the value of the `type` property of a `tabIndexChange` event object.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`target` | The object whose tabIndex has changed. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.

### textInput

Event

Event Object Type: `flash.events.TextEvent`
property TextEvent.type = `flash.events.TextEvent.TEXT_INPUT`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.0, Flash Player 9, Flash Lite 4

Dispatched when a user enters one or more characters of text. Various text input methods can generate this event, including standard keyboards, input method editors (IMEs), voice or speech recognition systems, and even the act of pasting plain text with no formatting or style information.

Defines the value of the `type` property of a `textInput` event object.

Note: This event is not dispatched for the Delete or Backspace keys.

This event has the following properties:

Property | Value
--- | ---
`bubbles` | `true`
`cancelable` | `true`; call the `preventDefault()` method to cancel default behavior.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`target` | The text field into which characters are being entered. The target is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`text` | The character or sequence of characters entered by the user.

### touchBegin

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.TOUCH_BEGIN`

Language Version: | ActionScript 3.0

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

Dispatched when the user first contacts a touch-enabled device (such as touches a finger to a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a `mouseDown` event.

Specifically, if a user touches a finger to a touch screen, the InteractiveObject instance can dispatch a `mouseDown` event or a `touchBegin` event, or both if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `mouseDown` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `touchBegin` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `TOUCH_BEGIN` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.

Example ( How to use this example )
The following example shows event handling for the `TOUCH_BEGIN`, `TOUCH_MOVE`, and `TOUCH_END` events. While the point of contact moves across the screen (`onTouchMove`), the x-coordinate relative to the stage is traced to output. For the `Sprite.startTouchDrag` parameters in the `onTouchBegin` function, the value for touchPointID is the value assigned to the event object. The bounds parameter is the rectangle defining the boundaries of the parent display object (bg is a display object containing MySprite).
Copy

    Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

    MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
    MySprite.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
    MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);

    function onTouchBegin(eBegin:TouchEvent) {
         eBegin.target.startTouchDrag(eBegin.touchPointID, false, bg.getRect(this));
         trace("touch begin");

     }

    function onTouchMove(eMove:TouchEvent) {
        trace(eMove.stageX);
    }

    function onTouchEnd(eEnd:TouchEvent) {
         eEnd.target.stopTouchDrag(eEnd.touchPointID);
         trace("touch end");
    }

Related API Elements

mouseDown event
flash.ui.Multitouch

### touchEnd

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.TOUCH_END`

Language Version: | ActionScript 3.0

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

Dispatched when the user removes contact with a touch-enabled device (such as lifts a finger off a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a `mouseUp` event.

Specifically, if a user lifts a finger from a touch screen, the InteractiveObject instance can dispatch a `mouseUp` event or a `touchEnd` event, or both if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `mouseUp` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `touchEnd` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `TOUCH_END` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.

Example ( How to use this example )
The following example shows event handling for the `TOUCH_BEGIN`, `TOUCH_MOVE`, and `TOUCH_END` events. While the point of contact moves across the screen (`onTouchMove`), the x-coordinate relative to the stage is traced to output. For the `Sprite.startTouchDrag` parameters in the `onTouchBegin` function, the value for touchPointID is the value assigned to the event object. The bounds parameter is the rectangle defining the boundaries of the parent display object (bg is a display object containing MySprite).
Copy

    Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

    MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
    MySprite.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
    MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);

    function onTouchBegin(eBegin:TouchEvent) {
         eBegin.target.startTouchDrag(eBegin.touchPointID, false, bg.getRect(this));
         trace("touch begin");

     }

    function onTouchMove(eMove:TouchEvent) {
        trace(eMove.stageX);
    }

    function onTouchEnd(eEnd:TouchEvent) {
         eEnd.target.stopTouchDrag(eEnd.touchPointID);
         trace("touch end");
    }

Related API Elements

mouseUp event
flash.ui.Multitouch

### touchMove

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.TOUCH_MOVE`

Language Version: | ActionScript 3.0

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

Dispatched when the user touches the device, and is continuously dispatched until the point of contact is removed. Note that this event does not require actual movement of the point of contact to be dispatched.

Some devices might interpret this contact as a `mouseMove` event. Specifically, if a user moves a finger across a touch screen, the InteractiveObject instance can dispatch a `mouseMove` event or a `touchMove` event, or both if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `mouseMove` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `touchMove` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `TOUCH_MOVE` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.

Example ( How to use this example )
The following example shows event handling for the `TOUCH_BEGIN`, `TOUCH_MOVE`, and `TOUCH_END` events. While the point of contact moves across the screen (`onTouchMove`), the x-coordinate relative to the stage is traced to output. For the `Sprite.startTouchDrag` parameters in the `onTouchBegin` function, the value for touchPointID is the value assigned to the event object. The bounds parameter is the rectangle defining the boundaries of the parent display object (bg is a display object containing MySprite).
Copy

    Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

    MySprite.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
    MySprite.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
    MySprite.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);

    function onTouchBegin(eBegin:TouchEvent) {
         eBegin.target.startTouchDrag(eBegin.touchPointID, false, bg.getRect(this));
         trace("touch begin");

     }

    function onTouchMove(eMove:TouchEvent) {
        trace(eMove.stageX);
    }

    function onTouchEnd(eEnd:TouchEvent) {
         eEnd.target.stopTouchDrag(eEnd.touchPointID);
         trace("touch end");
    }

Related API Elements

mouseMove event
flash.ui.Multitouch

### touchOut

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.TOUCH_OUT`

Language Version: | ActionScript 3.0

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

Dispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device (such as drags a finger from one display object to another on a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a `mouseOut` event.

Specifically, if a user moves a finger across a touch screen, the InteractiveObject instance can dispatch a `mouseOut` event or a `touchOut` event, or both if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `mouseOut` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `touchOut` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `TOUCH_OUT` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.

Related API Elements

mouseOut event
flash.ui.Multitouch

### touchOver

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.TOUCH_OVER`

Language Version: | ActionScript 3.0

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

Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a `mouseOver` event.

Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can dispatch a `mouseOver` event or a `touchOver` event, or both if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `mouseOver` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `touchOver` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `TOUCH_OVER` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.

Related API Elements

mouseOver event
flash.ui.Multitouch

### touchRollOut

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.TOUCH_ROLL_OUT`

Language Version: | ActionScript 3.0

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

Dispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device (such as drags a finger from over a display object to a point outside the display object on a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a `rollOut` event.

Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can dispatch a `rollOut` event or a `touchRollOut` event, or both if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `rollOut` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `touchRollOut` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `TOUCH_ROLL_OUT` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.

Related API Elements

rollOut event
flash.ui.Multitouch

### touchRollOver

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.TOUCH_ROLL_OVER`

Language Version: | ActionScript 3.0

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

Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a `rollOver` event.

Specifically, if a user moves a finger over an InteractiveObject, the InteractiveObject instance can dispatch a `rollOver` event or a `touchRollOver` event, or both if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `rollOver` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `touchRollOver` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `TOUCH_ROLL_OVER` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.

Related API Elements

rollOver event
flash.ui.Multitouch

### touchTap

Event

Event Object Type: `flash.events.TouchEvent`
property TouchEvent.type = `flash.events.TouchEvent.TOUCH_TAP`

Language Version: | ActionScript 3.0

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

Dispatched when the user lifts the point of contact over the same InteractiveObject instance on which the contact was initiated on a touch-enabled device (such as presses and releases a finger from a single point over a display object on a mobile phone or tablet with a touch screen). Some devices might also interpret this contact as a `click` event.

Specifically, if a user taps a finger over an InteractiveObject, the InteractiveObject instance can dispatch a `click` event or a `touchTap` event, or both if the current environment supports it. Choose how you want to handle the user interaction. Use the flash.ui.Multitouch class to manage touch event handling (enable touch gesture event handling, simple touch point event handling, or disable touch events so only mouse events are dispatched). If you choose to handle the `click` event, then the same event handler will run on a touch-enabled device and a mouse enabled device. However, if you choose to handle the `touchTap` event, you can design your event handler to respond to the specific needs of a touch-enabled environment and provide users with a richer touch-enabled experience. You can also handle both events, separately, to provide a different response for a touch event than a mouse event.

Note: See the Multitouch class for environment compatibility information.

Defines the value of the `type` property of a `TOUCH_TAP` touch event object.

The dispatched TouchEvent object has the following properties:

Property | Value
--- | ---
`altKey` | `true` if the Alt key is active (Windows or Linux).
`bubbles` | `true`
`cancelable` | `false`; there is no default behavior to cancel.
`commandKey` | `true` on the Mac if the Command key is active; `false` if it is inactive. Always `false` on Windows.
`controlKey` | `true` if the Ctrl or Control key is active; `false` if it is inactive.
`ctrlKey` | `true` on Windows or Linux if the Ctrl key is active. `true` on Mac if either the Ctrl key or the Command key is active. Otherwise, `false`.
`currentTarget` | The object that is actively processing the Event object with an event listener.
`eventPhase` | The current phase in the event flow.
`isRelatedObjectInaccessible` | `true` if the relatedObject property is set to `null` because of security sandbox rules.
`localX` | The horizontal coordinate at which the event occurred relative to the containing sprite.
`localY` | The vertical coordinate at which the event occurred relative to the containing sprite.
`pressure` | A value between `0.0` and `1.0` indicating force of the contact with the device. If the device does not support detecting the pressure, the value is `1.0`.
`relatedObject` | A reference to a display list object related to the event.
`shiftKey` | `true` if the Shift key is active; `false` if it is inactive.
`sizeX` | Width of the contact area.
`sizeY` | Height of the contact area.
`stageX` | The horizontal coordinate at which the event occurred in global stage coordinates.
`stageY` | The vertical coordinate at which the event occurred in global stage coordinates.
`target` | The InteractiveObject instance under the touching device. The `target` is not always the object in the display list that registered the event listener. Use the `currentTarget` property to access the object in the display list that is currently processing the event.
`touchPointID` | A unique identification number (as an int) assigned to the touch point.

Example ( How to use this example )
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);
    }

Related API Elements

click event
flash.ui.Multitouch
Examples How to use this example
InteractiveObjectExample.as
The following example uses the `InteractiveObjectExample` class, which in turn uses the `ChildSprite` class to draw a rectangle and then manipulate that rectangle based on various mouse events. This task is accomplished by performing the following steps:

1. In the `InteractiveObjectExample` constructor, a new ChildSprite object of type Sprite called `child` is created, which calls the ChildSprite constructor method to draw the shape and add mouse events for the shape (as explained in the following steps). The `child` object is added to the top of the display list at coordinates x = 0, y = 0.
2. In the `ChildSprite` class, declare the `size` and `overSize` properties that are used later in the `draw()` method and MouseEvent methods.
3. Declare properties that set the background color to orange, the mouse-over color to dark yellow, and the mouse-down color to light blue.
4. In the `ChildSprite` constructor, an orange square is drawn by using methods from the Graphics class and the `draw()` method.
5. The constructor adds four MouseEvent event listener methods:
   - `mouseOverHandler`: redraws a larger 60 x 60 pixel square with a dark-yellow color at the original coordinates.
   - `mouseOutHandler`: returns the square to its original size and color.
   - `mouseDownHandler`: redraws a larger 60 x 60 pixel square with a light-blue color at the original coordinates.
   - `mouseUpHandler`: same as `mouseOverHandler`.

Copy

    package {
        import flash.display.Sprite;

        public class InteractiveObjectExample extends Sprite {

            public function InteractiveObjectExample() {
                var child:Sprite = new ChildSprite();
                addChild(child);
            }
        }
    }

    import flash.display.Sprite;
    import flash.events.MouseEvent;

    class ChildSprite extends Sprite {
        private var size:uint = 50;
        private var overSize:uint = 60;
        private var backgroundColor:uint = 0xFFCC00;
        private var overColor:uint = 0xCCFF00;
        private var downColor:uint = 0x00CCFF;

        public function ChildSprite() {
            buttonMode = true;
            draw(size, size, backgroundColor);
            addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
            addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
            addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
        }

        private function draw(w:uint, h:uint, bgColor:uint):void {
            graphics.clear();
            graphics.beginFill(bgColor);
            graphics.drawRect(0, 0, w, h);
            graphics.endFill();
        }

        public function mouseOverHandler(event:MouseEvent):void {
            trace("mouseOverHandler");
            draw(overSize, overSize, overColor);
        }

        public function mouseOutHandler(event:MouseEvent):void {
            trace("mouseOutHandler");
            draw(size, size, backgroundColor);
        }

        public function mouseDownHandler(event:MouseEvent):void {
            trace("mouseDownHandler");
            draw(overSize, overSize, downColor);
        }

        public function mouseUpHandler(event:MouseEvent):void {
            trace("mouseUpHandler");
            draw(overSize, overSize, overColor);
        }
    }

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