# hitTest in child/nested movieclips...problem

**URL:** <https://forum.kirupa.com/t/hittest-in-child-nested-movieclips-problem/190084>\
**Category:** Uncategorized\
**Created:** [June 8, 2006, 2:58pm UTC](https://forum.kirupa.com/t/hittest-in-child-nested-movieclips-problem/190084 "2006-06-08T14:58:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheClue](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@TheClue](https://forum.kirupa.com/u/TheClue)\
**Post date:** [June 8, 2006, 2:58pm UTC](https://forum.kirupa.com/t/hittest-in-child-nested-movieclips-problem/190084/1 "2006-06-08T14:58:13Z")

</div>

i searched everywhere, i was not able to find a solution

my xml menu implementation use a “main” Menu class. This class parse the xml file and create an aeeay of MenuItem class. MenuItem costructor is (stripped down version) something like this:

```auto

function MenuItem(name: String, url: String, parent_mc: MovieClip)

```

parent\_mc is a reference to the “container” MovieClip for Items (generally an emptymovieclip made by Menu class)

in MovieClip costructor i attack the symbol i planned to use as menu item:

```auto

this.item_mc = parent_mc.attackMovieClip("item_mc", name + "_mc", parent_mc.getNextHighestDepth());

```

all ok, it works. but when i try to add some behaviours to to this.item\_mc like:

```auto

var thisObj = this;

this.item_mc.onMouseMove = function(){
		
if (this.hitTest(thisObj.parent_mc._xmouse, thisObj.parent_mc._ymouse, true)) trace("hit");
else trace("miss");
			
			
}

```

hitTest return always false 😕 waz wrong?

tnx in advance
