# Another hitTest question (Flash MX)

**URL:** https://forum.kirupa.com/t/another-hittest-question-flash-mx/136082
**Category:** Uncategorized
**Created:** [February 2, 2005, 3:24am UTC](https://forum.kirupa.com/t/another-hittest-question-flash-mx/136082 "2005-02-02T03:24:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![happy](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@happy](https://forum.kirupa.com/u/happy)
#### Post date: [February 2, 2005, 3:24am UTC](https://forum.kirupa.com/t/another-hittest-question-flash-mx/136082/1 "2005-02-02T03:24:27Z")

</div>

I’m trying to make a maze game, and my problem is that i can’t make the ball stop where I want it to. The walls are thin, and if the ball has a high speed it just goes through them. I want the hitTest to detect if any part of the ball touches the wall, not just the center point. This is the code for the ball:

> }onClipEvent (enterFrame) {  
> if (\_root.vertical.hitTest(\_x, \_y, true)){  
> xspeed \*= -0.2;  
> \_x = posx;

}  
if (\_root.horizontal.hitTest(\_x, \_y, true)){  
yspeed \*= -0.2;  
\_y = posy;  
}

Can anyone help me? Is my explanation understandable? Thanks in advance.
