EditDrag and drop with mouse
Basic Idea: Use the handy shortcut "support drag & drop with mouse". See notes below if you want to create this behavior from scratch. .
Sample Game:
http://www.popfly.com/users/team/HowDoI-DragAndDropDetails: Using the shortcut works great. But if you really want to know how this works, read on.
Actor->Behaviors->Event
Key thing to note here is that mouse event is defined for "only on me" meaning the event is triggered only when you click
on the actor.
 Mouse Event for drag & drop support (Click the image to view full size) |
Actor->Behaviors->Motion
Key thing to note here is that motion is defined
toward mouse and
While Receiving Event.
 Motion for drag & drop support (Click the image to view full size) |