# HitTest ''HELP''

**URL:** <https://forum.kirupa.com/t/hittest-help/65746>\
**Category:** flash\
**Created:** [September 29, 2004, 8:35am UTC](https://forum.kirupa.com/t/hittest-help/65746 "2004-09-29T08:35:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![COYz](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@COYz](https://forum.kirupa.com/u/COYz)\
**Post date:** [September 29, 2004, 8:35am UTC](https://forum.kirupa.com/t/hittest-help/65746/1 "2004-09-29T08:35:34Z")

</div>

i need to know how to use hittest heres me code maybe u can help me:

onClipEvent (load) {  
if (this.hitTest(\_root.goal)) {  
gotoAndPlay(2);  
}  
}

or

onClipEvent (load) {  
if (\_target.car.hitTest(\_root.goal)) {  
gotoAndPlay(2);  
}  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 12:51pm UTC](https://forum.kirupa.com/t/hittest-help/65746/2 "2004-09-29T12:51:05Z")

</div>

how about a better description?

you probably want to use onClipEvent(enterFrame) as to onLoad, because onLoad will only check the hitTest once when it loads, enterFrame will check every frame…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 29, 2004, 1:27pm UTC](https://forum.kirupa.com/t/hittest-help/65746/3 "2004-09-29T13:27:45Z")

</div>

it still aint workin,  
see im making a game its a car game and when it goes over the goal it ments to go to a new frame, saying youve won or something but if the opponent goes over it, it goes to another frame saying youve lost
