# hitTest not working

**URL:** <https://forum.kirupa.com/t/hittest-not-working/222757>\
**Category:** Uncategorized\
**Created:** [April 16, 2007, 6:48pm UTC](https://forum.kirupa.com/t/hittest-not-working/222757 "2007-04-16T18:48:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![phena](https://avatars.discourse-cdn.com/v4/letter/p/e9bcb4/32.png) [@phena](https://forum.kirupa.com/u/phena)\
**Post date:** [April 16, 2007, 6:48pm UTC](https://forum.kirupa.com/t/hittest-not-working/222757/1 "2007-04-16T18:48:03Z")

</div>

i got this game im creating…  
its a simple stickman that can move in all directions and shoot arrows based of the angle of his armes/bow. The point is hitting the enemy stickmen, but i cant seem to get the hitTest right, ive scanned alot on the forums, but cant find the error…

ActionScript Code:  
[FONT=Courier New][LEFT]\</p\>  
\<p\>[COLOR=#808080]_//delete if hit ground\</p\>_[/COLOR]  
\<p\> [COLOR=#0000ff]trace[/COLOR]COLOR=#000000[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]if[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]trace[/COLOR]COLOR=#000000[/COLOR]\</p\>  
\<p\> arrowStopped = true\</p\>  
\<p\> [COLOR=#0000ff]if[/COLOR][COLOR=#000000]([/COLOR]timerISset == [COLOR=#000000] **false** [/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> oldTime = [COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]round[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]getTimer[/COLOR]COLOR=#000000[/COLOR] / [COLOR=#000080]1000[/COLOR][COLOR=#000000])[/COLOR]\</p\>  
\<p\> timerISset = true\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]if[/COLOR][COLOR=#000000]([/COLOR]oldTime - COLOR=#000000[/COLOR] == [COLOR=#000080]0[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]trace[/COLOR]COLOR=#000000[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]removeMovieClip[/COLOR]COLOR=#000000[/COLOR]\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\> [COLOR=#000000]}[/COLOR]\</p\>  
\<p\> [COLOR=#808080]_//delete if hit ground end\</p\>_[/COLOR]  
\<p\>  
[/LEFT]  
[/FONT]

the target is right too, and is just a box, moving after the players legs.

the file is too large to be added, even tho i zipped it…
