# hitTest errors between attached movieclip

**URL:** <https://forum.kirupa.com/t/hittest-errors-between-attached-movieclip/130620>\
**Category:** Uncategorized\
**Created:** [December 6, 2004, 10:27pm UTC](https://forum.kirupa.com/t/hittest-errors-between-attached-movieclip/130620 "2004-12-06T22:27:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![icio](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/icio/32/484_2.png) [@icio](https://forum.kirupa.com/u/icio)\
**Post date:** [December 6, 2004, 10:27pm UTC](https://forum.kirupa.com/t/hittest-errors-between-attached-movieclip/130620/1 "2004-12-06T22:27:19Z")

</div>

i’ve checked this serveral times, there is nothing wrong with my actionscript, but still hitTest returns undefined between movieclips put onto the stage using attachMovie();

here’s my code:

```auto
thingOne = function() {};
thingTwo = function() {
	this._x = 100;
	this._y = 100;
};
//
Object.registerClass("one", thingOne);
Object.registerClass("two", thingTwo);
//
thingOne.prototype.onEnterFrame = function() {
	//make sure that both movieclips are valid movieclips
	trace(this);
	trace(_root.two);
	//
	trace(this.hitTest(_root.two));
}
//
_root.attachMovie("one", "one", 1);
_root.attachMovie("two", "two", 2);

```

is this is a bug? was it left out on purpose? am i wrong?  
why is this?
