Zephadias
February 17th, 2009, 01:16 PM
I have unit A: on a mouseEvent: MouseUp and MouseDown event. I'm going click and dragging objects.
Unit A when I pick it up says i have picked up Unit A. I drop it in a location and it stays. GOOD
I pick up Unit B and it says i picked up Unit B. I drop it on top of Unit A and it says I have dropped Unit A. NOT GOOD.
I only want to drop unit B, not A.
So i looked at the events:
target The InteractiveObject instance under the pointing device. The target is not always the object in the display list that registered the event listener. Use the currentTarget property to access the object in the display list that is currently processing the event.
so I use currentTarget instead:
currentTarget The object that is actively processing the Event object with an event listener.
Except they both return the same. Both will register Unit A, even though I am holding Unit A.
Any ideas? This is driving me nuts.
Thanks
Unit A when I pick it up says i have picked up Unit A. I drop it in a location and it stays. GOOD
I pick up Unit B and it says i picked up Unit B. I drop it on top of Unit A and it says I have dropped Unit A. NOT GOOD.
I only want to drop unit B, not A.
So i looked at the events:
target The InteractiveObject instance under the pointing device. The target is not always the object in the display list that registered the event listener. Use the currentTarget property to access the object in the display list that is currently processing the event.
so I use currentTarget instead:
currentTarget The object that is actively processing the Event object with an event listener.
Except they both return the same. Both will register Unit A, even though I am holding Unit A.
Any ideas? This is driving me nuts.
Thanks