Skip to main content
Known Participant
May 29, 2013
Question

Event does not occur

  • May 29, 2013
  • 1 reply
  • 381 views

I have an object which is supposed to work like this: when you click it is dragged, and when releasing the mouse occurs if the probe is touching the table. If so he should remain on the table, etc.

My problem is, that the check (MouseEvent.MOUSE_UP) occurs only if other objects (that can also be pressed) are not in the area, if they are in the same place where I release the mouse, they perceive the event, but I do not want them to take the event, but the object was dragged by mouse

Thanks all!

This topic has been closed for replies.

1 reply

Inspiring
May 29, 2013

Make sure that the object you drag is always in the front of any other object on your stage.

use stage.numChildren-1 to get the highest index of any object on your stage, then set the Child Index of your dragged object to this value.

If you have dynamicly generated objects, put that function into an enter frame loop.

Rotem RAuthor
Known Participant
May 29, 2013

Thank you very much! helpfull answer!

I made sure the object is Upper, and really is an excellent responds to the mouse