Consider the following code.
var sParent:Sprite = new Sprite();
var obj:Sprite = new Sprite();
var childA:Sprite = new Sprite();
var childB:Sprite = new Sprite();
sParent.addChild(obj);
obj.addChild(childA);
obj.addChild(childB);
childB.mouseChildren = false;
childB.mouseEnabled = false;
sParent.addEventListener(MouseEvent.CLICK, itemClickHandler);
sParent.addEventListener(MouseEvent.ROLL_OVER, onHoverIn);
sParent.addEventListener(MouseEvent.ROLL_OUT, onHoverOut);
Now, I want to detect events on “ChildA” but I do not want to detect children on “ChildB”
mouseChildren = false;
obviously isn’t the solution in this particular case. Any ideas?
Looks like it is a limitation or a design feature of ROLL_OVER, check the following program I have changed the ROLL_OVER event to MOUSE_OVER and target and currentTarget are giving the correct sprites :