Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
DragEvent

Package | mx.events
Class | public class DragEvent
Inheritance | DragEvent flash.events.MouseEvent
Subclasses | InterDragManagerEvent

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The DragEvent class represents event objects that are dispatched as part of a drag-and-drop operation.

See also

mx.managers.DragManager
mx.core.DragSource
mx.core.UIComponent

Public Properties

| Property | Defined By
--- | --- | ---
|  | action : String The requested action. | DragEvent
|  | draggedItem : Object If the dragInitiator property contains an IAutomationObject object, this property contains the child IAutomationObject object near the mouse cursor. | DragEvent
|  | dragInitiator : IUIComponent The component that initiated the drag. | DragEvent
|  | dragSource : DragSource The DragSource object containing the data being dragged. | DragEvent

Public Methods

| Method | Defined By
--- | --- | ---
|  | DragEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = true, dragInitiator:IUIComponent = null, dragSource:DragSource = null, action:String = null, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false) Constructor. | DragEvent

Public Constants

| Constant | Defined By
--- | --- | ---
|  | DRAG_COMPLETE : String = dragComplete [static] The DragEvent.DRAG_COMPLETE constant defines the value of the type property of the event object for a dragComplete event. | DragEvent
|  | DRAG_DROP : String = dragDrop [static] The DragEvent.DRAG_DROP constant defines the value of the type property of the event object for a dragDrop event. | DragEvent
|  | DRAG_ENTER : String = dragEnter [static] The DragEvent.DRAG_ENTER constant defines the value of the type property of the event object for a dragEnter event. | DragEvent
|  | DRAG_EXIT : String = dragExit [static] The DragEvent.DRAG_EXIT constant defines the value of the type property of the event object for a dragExit event. | DragEvent
|  | DRAG_OVER : String = dragOver [static] The DragEvent.DRAG_OVER constant defines the value of the type property of the event object for a dragOver event. | DragEvent
|  | DRAG_START : String = dragStart [static] The DragEvent.DRAG_START constant defines the value of the type property of the event object for a dragStart event. | DragEvent

Property Detail

action | property

`public var action:String`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The requested action. One of `DragManager.COPY`, `DragManager.LINK`, `DragManager.MOVE`, or `DragManager.NONE`.

draggedItem | property |

`public var draggedItem:Object`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

If the `dragInitiator` property contains an IAutomationObject object, this property contains the child IAutomationObject object near the mouse cursor. If the `dragInitiator` property does not contain an IAutomationObject object, this proprty is `null`.

dragInitiator | property |

`public var dragInitiator:IUIComponent`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The component that initiated the drag.

dragSource | property |

`public var dragSource:DragSource`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The DragSource object containing the data being dragged.

Constructor Detail

DragEvent | () | Constructor

`public function DragEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = true, dragInitiator:IUIComponent = null, dragSource:DragSource = null, action:String = null, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false)`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Constructor. Normally called by the Flex control and not used in application code.

Parameters

| `type:String` — The event type; indicates the action that caused the event.
| `bubbles:Boolean` (default = `false`)`` — Specifies whether the event can bubble up the display list hierarchy.
| `cancelable:Boolean` (default = `true`)`` — Specifies whether the behavior associated with the event can be prevented.
| `dragInitiator:IUIComponent` (default = `null`)`` — IUIComponent that specifies the component initiating the drag.
| `dragSource:DragSource` (default = `null`)`` — A DragSource object containing the data being dragged.
| `action:String` (default = `null`)`` — The specified drop action, such as `DragManager.MOVE`.
| `ctrlKey:Boolean` (default = `false`)`` — Indicates whether the `Ctrl` key was pressed.
| `altKey:Boolean` (default = `false`)`` — Indicates whether the `Alt` key was pressed.
| `shiftKey:Boolean` (default = `false`)`` — Indicates whether the `Shift` key was pressed.

Constant Detail

DRAG_COMPLETE | Constant

`public static const DRAG_COMPLETE:String = dragComplete`

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The `DragEvent.DRAG_COMPLETE` constant defines the value of the `type` property of the event object for a `dragComplete` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`action` | The action that caused the event: `DragManager.COPY`, `DragManager.LINK`, `DragManager.MOVE`, or `DragManager.NONE`.
`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`.
`dragInitiator` | The component that initiated the drag.
`dragSource` | The DragSource object containing the data being dragged.
`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_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 `type` property of the event object for a `dragDrop` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`action` | The action that caused the event: `DragManager.COPY`, `DragManager.LINK`, `DragManager.MOVE`, or `DragManager.NONE`.
`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`.
`dragInitiator` | The component that initiated the drag.
`dragSource` | The DragSource object containing the data being dragged.
`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 `type` property of the event object for a `dragEnter` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`action` | The action that caused the event, which is always `DragManager.MOVE`.
`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`.
`dragInitiator` | The component that initiated the drag.
`dragSource` | The DragSource object containing the data being dragged.
`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 `type` property of the event object for a `dragExit` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`action` | The action that caused the event: `DragManager.COPY`, `DragManager.LINK`, `DragManager.MOVE`, or `DragManager.NONE`.
`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`.
`dragInitiator` | The component that initiated the drag.
`dragSource` | The DragSource object containing the data being dragged.
`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 `type` property of the event object for a `dragOver` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`action` | The action that caused the event: `DragManager.COPY`, `DragManager.LINK`, `DragManager.MOVE`, or `DragManager.NONE`.
`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`.
`dragInitiator` | The component that initiated the drag.
`dragSource` | The DragSource object containing the data being dragged.
`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 `type` property of the event object for a `dragStart` event.

The properties of the event object have the following values:

Property | Value
--- | ---
`action` | The action that caused the event: `DragManager.COPY`, `DragManager.LINK`, `DragManager.MOVE`, or `DragManager.NONE`.
`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`.
`dragInitiator` | The component that initiated the drag.
`dragSource` | The DragSource object containing the data being dragged.
`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.

Sun Mar 5 2017, 03:42 PM +11:00