views:

31

answers:

1

Hi,

I need to detect when a user d-b-n-d an object into a sprite. I'm adding the 3 event listeners I need, but only one of them works:

ontainer.addEventListener( DragEvent.DRAG_ENTER, dragEnterHandler); container.addEventListener( DragEvent.DRAG_EXIT, dragExitHandler); container.addEventListener( DragEvent.DRAG_DROP, dragDropHandler);

The only one I can listen to is DRAG_ENTER. And I'm using to accept the dragged object:

DragManager.acceptDragDrop(event.currentTarget.parent as IUIComponent);

Any ideas why I can't listen to the other two events?

tks.

A: 

From the documentation...

To accept the drop, the event handler calls the DragManager.acceptDragDrop() method. You must call the DragManager.acceptDragDrop() method for the drop target to receive the dragOver, dragExit, and dragDrop events.

Gregor Kiddie
I'm already doing that, "acceptDragDrop", and the drag is accepted, but once I release the mouse button, the DragEvent.DRAG_DROP is not dispatched.
fast-dev
cna you post your code for the dragEnterHandler method?
Gregor Kiddie