On Root:
I have tree clip
I have cutter clip
while tree clip has branch grid(dots) as its child
I am getting hitTest between cutter and each dot(tree child) when I click once, but there x,y co-ordinate are very different for e.g
if cutter is on: 275, 267
then
its getting hitTest of dot: Hit: -306.8, -118.35
How should I make it similar to match that its hitting the only grid.
Note: when hitTest happen it hits most of the grid, I am trying to get the dot which is just below the cutter edge.
I have tried to subtract the x,y values to make them a close match but clicking different dot always has difference of 3-5 pixels or 10-15 pixels in y-cordinate
Thanks,
Najm.
Since dot’s are part of another movie clip and the cutter is not, you need to transform the coordinates of the dot’s. Easiest way is to use localToGlobal(), or globalToLocal() to transform the cutter’s cooridinate. Try Adobe documentation for more info how to use theese functions …