I have a draggable item, a MovieClip that calls startDrag() on itself when it is clicked, and another MovieClip on the stage.
I need the MovieClip to receive ROLL_OVER and ROLL_OUT events while the draggable MovieClip is being dragged over it, but the lower clip doesn’t receive these messages while a clip is being dragged over it.
Essentially, ROLL_OVER is only sent to the topmost MovieClip under the mouse. Normally, you’d fix that with some combination of mouseEnabled or mouseChildren on the overlapping MovieClips, but if you do that to a draggable MovieClip, it breaks dragging. I need to detect when the mouse is over the lower MovieClip, regardless of what MovieClips are above it.
So, how do I do that?
You could disable mouse interaction for the clip that is being dragged eg.
On your
MOUSE_DOWNevent:Then in your
MOUSE_UPevent where you callstopDrag()you can enable it again:I haven’t tried this but it should stop the clip that you are dragging from receiving any mouse events.
*Just one thing though is that since the clip itself doesn’t receive mouse events, the
MOUSE_UPevent cannot be placed directly onto it but will have to be placed on it’s parent or the stage.