Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
DragEvent

Package | org.apache.flex.events
Class | public class DragEvent
Inheritance | DragEvent DragEventBase MouseEvent flash.events.MouseEvent

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Drag and Drop Events.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | clientX : Number | MouseEvent
|  | clientY : Number | MouseEvent
|  | dragInitiator : IDragInitiator [static] The object that wants to know if a drop is accepted | DragEvent
|  | dragSource : Object [static] The data being dragged. | DragEvent
|  | screenX : Number [read-only] | MouseEvent
|  | screenY : Number [read-only] | MouseEvent

Public Methods

| Method | Defined By
--- | --- | ---
|  | DragEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) Constructor. | DragEvent
|  | createDragEvent(type:String, event:MouseEvent):DragEvent [static] Factory for DragEvents. | DragEvent
|  | dispatchDragEvent(event:DragEvent, target:IEventDispatcher):void [static] Dispatch a DragEvent | DragEvent

Public Constants
Hide Inherited Public Constants
Show Inherited Public Constants

| Constant | Defined By
--- | --- | ---
|  | CLICK : String = click [static] | MouseEvent
|  | DOUBLE_CLICK : String = doubleClick [static] | MouseEvent
|  | DRAG_DROP : String = dragDrop [static] The DragEvent.DRAG_DROP constant defines the value of the event object's type property for a dragDrop event. | DragEvent
|  | DRAG_END : String = dragEnd [static] The DragEvent.DRAG_END constant defines the value of the event object's type property for a dragEnd event. | DragEvent
|  | DRAG_ENTER : String = dragEnter [static] The DragEvent.DRAG_ENTER constant defines the value of the event object's type property for a dragEnter event. | DragEvent
|  | DRAG_EXIT : String = dragExit [static] The DragEvent.DRAG_EXIT constant defines the value of the event object's type property for a dragExit event. | DragEvent
|  | DRAG_MOVE : String = dragMove [static] The DragEvent.DRAG_MOVE constant defines the value of the event object's type property for a dragMove event. | DragEvent
|  | DRAG_OVER : String = dragOver [static] The DragEvent.DRAG_OVER constant defines the value of the event object's type property for a dragOver event. | DragEvent
|  | DRAG_START : String = dragStart [static] The DragEvent.DRAG_START constant defines the value of the event object's type property for a dragStart event. | DragEvent
|  | MOUSE_DOWN : String [static] | MouseEvent
|  | MOUSE_MOVE : String [static] | MouseEvent
|  | MOUSE_OUT : String [static] | MouseEvent
|  | MOUSE_OVER : String [static] | MouseEvent
|  | MOUSE_UP : String [static] | MouseEvent
|  | ROLL_OUT : String [static] | MouseEvent
|  | ROLL_OVER : String [static] | MouseEvent

Property Detail

dragInitiator | property

`public static var dragInitiator:IDragInitiator`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The object that wants to know if a drop is accepted

dragSource | property |

`public static var dragSource:Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The data being dragged. Or an instance of an object describing the data.

Constructor Detail

DragEvent | () | Constructor

`public function DragEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Constructor. Do not call 'new DragEvent', use the createDragEvent method instead.

Parameters

| `type:String` — The name of the event.
| `bubbles:Boolean` (default = `false`)`` — Whether the event bubbles.
| `cancelable:Boolean` (default = `false`)`` — Whether the event can be canceled.

Method Detail

createDragEvent | () | method

`public static function createDragEvent(type:String, event:MouseEvent):DragEvent`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Factory for DragEvents.

Parameters

| `type:String` — The name of the event.
| `event:MouseEvent` — The MouseEvent properties to copy into the DragEvent.

Returns

| `DragEvent` — The new DragEvent.

dispatchDragEvent | () | method |

`public static function dispatchDragEvent(event:DragEvent, target:IEventDispatcher):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Dispatch a DragEvent

Parameters

| `event:DragEvent` — The DragEvent to dispatch.
| `target:IEventDispatcher` — The target to dispatch the event from.

Constant Detail

DRAG_DROP | Constant

`public static const DRAG_DROP:String = dragDrop`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The `DragEvent.DRAG_DROP` constant defines the value of the event object's `type` property for a `dragDrop` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`bubbles` | false
`cancelable` | false
`currentTarget` | The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`target` | The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

DRAG_END | Constant |

`public static const DRAG_END:String = dragEnd`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The `DragEvent.DRAG_END` constant defines the value of the event object's `type` property for a `dragEnd` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`bubbles` | false
`cancelable` | false
`currentTarget` | The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`target` | The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

DRAG_ENTER | Constant |

`public static const DRAG_ENTER:String = dragEnter`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The `DragEvent.DRAG_ENTER` constant defines the value of the event object's `type` property for a `dragEnter` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`bubbles` | false
`cancelable` | false
`currentTarget` | The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`target` | The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

DRAG_EXIT | Constant |

`public static const DRAG_EXIT:String = dragExit`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The `DragEvent.DRAG_EXIT` constant defines the value of the event object's `type` property for a `dragExit` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`bubbles` | false
`cancelable` | false
`currentTarget` | The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`target` | The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

DRAG_MOVE | Constant |

`public static const DRAG_MOVE:String = dragMove`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The `DragEvent.DRAG_MOVE` constant defines the value of the event object's `type` property for a `dragMove` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`bubbles` | false
`cancelable` | false
`currentTarget` | The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`target` | The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

DRAG_OVER | Constant |

`public static const DRAG_OVER:String = dragOver`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The `DragEvent.DRAG_OVER` constant defines the value of the event object's `type` property for a `dragOver` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`bubbles` | false
`cancelable` | false
`currentTarget` | The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`target` | The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

DRAG_START | Constant |

`public static const DRAG_START:String = dragStart`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The `DragEvent.DRAG_START` constant defines the value of the event object's `type` property for a `dragStart` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`bubbles` | false
`cancelable` | false
`currentTarget` | The Object that defines the event listener that handles the event. For example, if you use `myButton.addEventListener()` to register an event listener, myButton is the value of the `currentTarget`.
`target` | The Object that dispatched the event; it is not always the Object listening for the event. Use the `currentTarget` property to always access the Object listening for the event.

Mon Sep 5 2016, 07:19 AM -07:00