Hi guys,
I’m just wondering why the first one doesn’t work? Is ‘hitTestPoint’ converting the point to global coordinates?
Maybe I’m tired, idk, but I’m having trouble wrapping my brain around this ![]()
Thanks in advance
//Testing first set of objects (children of the parentObj MovieClip) ->Not working
if(parentObj.green.hitTestPoint(parentObj.blue.x, parentObj.blue.y, true))
{
txt1.text = "Green Overlapping";
}
if(parentObj.red.hitTestPoint(parentObj.blue.x, parentObj.blue.y, true))
{
txt1.text = "Red Overlapping";
}
//Testing the second group (children of Main) ->working
if(green.hitTestPoint(blue.x, blue.y, true))
{
txt2.text = "Green Overlapping";
}
if(red.hitTestPoint(blue.x, blue.y, true))
{
txt2.text = "Red Overlapping";
}