# hitTest help plz!

**URL:** <https://forum.kirupa.com/t/hittest-help-plz/89577>\
**Category:** flash\
**Created:** [May 9, 2005, 9:21pm UTC](https://forum.kirupa.com/t/hittest-help-plz/89577 "2005-05-09T21:21:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unchew](https://avatars.discourse-cdn.com/v4/letter/u/7ba0ec/32.png) [@unchew](https://forum.kirupa.com/u/unchew)\
**Post date:** [May 9, 2005, 9:21pm UTC](https://forum.kirupa.com/t/hittest-help-plz/89577/1 "2005-05-09T21:21:17Z")

</div>

OMG. I had been trying to make my moveable player stop moving when it hit a squared, as if it was a solid wall… and I had a very bright idea… but not very bright at last. I achieved making my character stop by using hitTest and making its speed go to “0”. But now, I can’t make it get away from the wall. As the speed has gone to “0”, It can’t move any longer… it’s stuck to the movie clip… here is the code I’m using… can anyone help please?

```auto
onClipEvent (enterFrame) {
if (_root.player.hitTest(this)) {
_root.speed=0;
} else {
_root.speed=2;
}
}

```

Thanks in advance.  
Unchew.
