# Hittest empty mc

**URL:** <https://forum.kirupa.com/t/hittest-empty-mc/84531>\
**Category:** Uncategorized\
**Created:** [March 28, 2005, 4:37pm UTC](https://forum.kirupa.com/t/hittest-empty-mc/84531 "2005-03-28T16:37:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gagnan](https://avatars.discourse-cdn.com/v4/letter/g/bbce88/32.png) [@gagnan](https://forum.kirupa.com/u/gagnan)\
**Post date:** [March 28, 2005, 4:37pm UTC](https://forum.kirupa.com/t/hittest-empty-mc/84531/1 "2005-03-28T16:37:13Z")

</div>

what i am trying to do is to detect a collision between an empty mc and  
an mc allready in stage.  
the empty mc is a line, which I draw with the mouse. when this line hits the other mc I want the colission to be detected. so far it doesnt work properly.  
the colision is being detected even if the line that i draw, doesnt hit the other mc. does it have to do with the properties of the empty mc, or the hittest method has to be changed???Here is the code:  
[COLOR=Red]\_root.mc.onEnterFrame=function(){  
if(\_root.mc.hitTest(\_root.line)){  
thingstohappen;}[/COLOR]
