# Simple hitTestPoint driving me nuts

**URL:** https://forum.kirupa.com/t/simple-hittestpoint-driving-me-nuts/332520
**Category:** Uncategorized
**Created:** [July 12, 2014, 7:17am UTC](https://forum.kirupa.com/t/simple-hittestpoint-driving-me-nuts/332520 "2014-07-12T07:17:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![IgiveUp](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@IgiveUp](https://forum.kirupa.com/u/IgiveUp)
#### Post date: [July 12, 2014, 7:17am UTC](https://forum.kirupa.com/t/simple-hittestpoint-driving-me-nuts/332520/1 "2014-07-12T07:17:48Z")

</div>

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

```php

//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";
}

```
