Handles drag and drop operations that originate with display objects that implement the IDragSource interface and end with display objects that implement the IDropTarget interface.

Available since

1.3.0

.

Static variables

@:value(null)staticread onlycurrentDropTarget:IDropTarget = null

Returns the drop target that has accepted the current drag action, or null if either no target has accepted or if no drag action is currently active.

Available since

1.3.0

.

@:value(null)staticread onlydragAvatar:DisplayObject = null

The avatar displayed for the current drag action, or null if no drag action is currently active.

Available since

1.3.0

.

@:value(1.0)staticread onlydragAvatarOffsetX:Float = 1.0

The x position offset for the drag avatar that was passed into the startDrag() method.

Available since

1.3.0

.

See also:

@:value(1.0)staticread onlydragAvatarOffsetY:Float = 1.0

The y position offset for the drag avatar that was passed into the startDrag() method.

Available since

1.3.0

.

See also:

@:value(null)staticread onlydragData:DragData = null

The data associated with the current drag action, or null if no drag action is currently active.

Available since

1.3.0

.

@:value(null)staticread onlydragSource:IDragSource = null

The IDragSource that started the current drag action, or null if no drag action is currently active.

Available since

1.3.0

.

staticread onlydragging:Bool

Indicates if a drag action is currently active or not.

Available since

1.3.0

.

@:value(false)staticread onlydropAccepted:Bool = false

Indicates if a drop has been accepted for the current drag action. If no drag action is currently active, returns false.

Available since

1.3.0

.

Static methods

staticacceptDrag(target:IDropTarget):Void

Tells the drag and drop manager if the target will accept the current drop. Meant to be called in a listener for the target's DragDropEvent.DRAG_ENTERevent.

Available since

1.3.0

.

@:value({ avatarOffsetY : 0.0, avatarOffsetX : 0.0, avatar : null })staticstartDrag(source:IDragSource, data:DragData, ?avatar:DisplayObject, avatarOffsetX:Float = 0.0, avatarOffsetY:Float = 0.0):Void

Starts a new drag. If another drag is currently active, it is immediately cancelled. Includes an optional "avatar", a visual representation of the data that is being dragged.

Available since

1.3.0

.