The Drag & Drop behavior enables objects to be dragged and dropped either by mouse or touch. On multi-touch devices, multiple objects can be dragged and dropped at once.
An object starts dragging when a mouse click or touch falls inside the object's collision polygon. It is released when the mouse button is released or the touch ends.
The Drag & Drop behavior has no properties.
Drag & Drop conditions
Is dragging
True if the object is currently being dragged by mouse or touch.
On drag start
Triggered when the object is clicked or touched inside its collision polygon.
On drop
Triggered when the object is being dragged, and the mouse button is released or the touch ends.
Drag & Drop actions
Set enabled
Enable or disable the Drag & Drop behavior. If disabled, clicking or touching the object has no effect and the object cannot be dragged. It also becomes 'transparent' to clicks and touches, meaning other objects underneath it can still be dragged and dropped. If the object is being dragged when it is disabled, the drag is cancelled, but On drop will not trigger.
Drag & Drop expressions
The Drag & Drop behavior has no expressions.