# hitTest Problem

**URL:** <https://forum.kirupa.com/t/hittest-problem/149387>\
**Category:** flash\
**Created:** [May 28, 2005, 3:57pm UTC](https://forum.kirupa.com/t/hittest-problem/149387 "2005-05-28T15:57:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abraxas](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@abraxas](https://forum.kirupa.com/u/abraxas)\
**Post date:** [May 28, 2005, 3:57pm UTC](https://forum.kirupa.com/t/hittest-problem/149387/1 "2005-05-28T15:57:25Z")

</div>

I dont think my code works;  
if (this.hitTest(undriv)){  
speed = 0;  
}  
Im new at hitTest and need some help.  
I have created a fla with a car, which u will be able to drive only on the road, not outside of it. I have created 1 MC and erased in it (the roads is the erased) and when the car hits the outside of the road, it will stop.  
My AS dont seem to work, i dont really know if i can do it like this.

EDIT: I got it working  
Still, is hitTest good? isnt there other things that will detect if they collect with another mcs?
