This content has been marked as final. Show 5 replies
I'm not sure if I correctly understand the problem but... If you are dragging one clip, and it moves under another clip and that second clip is also referenced by actionscript then any new action will be received by the clip that is on top.
If this is what is going on, then you could swap depths so that the clip that you are moving remains on top. Something like this:
Question: If that's the case ("... then any new action will be received by the clip that is on top"), then why Cl.onRelease function doesn't stop the dragging of MC1 (in this case H1)? stopDrag will release anything that's being dragged, right?
But, I've modified a bit the solution that you gave me. I used
since MC1 could be dropped onto any other MCs (which I don't know which one beforehand) on the stage.
Don't know if this will help, but this is one of the most often overlooked movieclip/button events: onReleaseOutside.
If you release the mouse, but it is over some other clip/button which also has defined clip events, the original item will not know that you have released it because it has been "release outside." This is one of the things I always test in any flash file I am given and often you get the "stuck to the mouse with no way to get it unstuck" problem.
So just define an onReleaseOutside handler that does whatever you would like to happen in that case and you should be good as gold.
Yes it does. Thanks a lot. Now I can sleep with peace.
Glad that worked out for you. Pleasant dreams!