# Help with hittest

**URL:** <https://forum.kirupa.com/t/help-with-hittest/237879>\
**Category:** Uncategorized\
**Created:** [September 5, 2007, 2:05am UTC](https://forum.kirupa.com/t/help-with-hittest/237879 "2007-09-05T02:05:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Terry\_elekes](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@Terry\_elekes](https://forum.kirupa.com/u/Terry_elekes)\
**Post date:** [September 5, 2007, 2:05am UTC](https://forum.kirupa.com/t/help-with-hittest/237879/1 "2007-09-05T02:05:37Z")

</div>

I do not know alot about actionscript but I found this movie and can not figure out why the trace says undefined instead of hit. Also I am not sure what in the code makes it follow the mouse when you test it. Could someone please explain this code to me.  
This is on frame one  
startDrag("/Target", true, 0, 0, 400, 300);  
setProperty("/VLine", \_x, getProperty("/Target", \_x));  
setProperty("/HLine", \_y, getProperty("/Target", \_y));  
ball.\_y += 2;  
function collide() {  
if (Target.hitTest(ball), true) {  
trace(hit);  
}  
}

collide();  
on frame two is gotoAndPlay(1);
