Hittest triggers underlying movieclips
Hi
I also posted this on another forum. Hope this one is a bit more active still.
I can't seem to figure this one out.
I have a simple for loop that activated when a stopDrag has been triggered.
this checks if my dragable object hits the part i want.
It does work however it also hittests on the movieclip that is underneath it. oddly enough if 3 clips overlap, they all trace out their name.
Each movieclip, about 13 in total, overlap each other, a few don't, those who don't overlap work perfectly.
I tried mouseChildren false;
Does anyone have an idea? Maybe I am just tired but I can't seem to grasp what is going on.
Many thanks in advance.
here a flint of the code where relevant
private function release(event: MouseEvent): void {
event.target.stopDrag();
for (var k: int = 0; k < whichclips.length; k++) {
whichclips
.mouseChildren = false; if (hitTestMouse(whichclips
)) { trace("hitTest " + whichclips
.name); }
}
}
public function hitTestMouse(hitarea: DisplayObject): Boolean {
return hitarea.hitTestPoint(hitarea.stage.mouseX, hitarea.stage.mouseY, true);
}