i made my character for a game and i made walls which work here is the code

onClipEvent (enterFrame) {
if (_root.wall.hitTest(_x, _y, true)) {
xspeed = 0;
yspeed = 0;
}

but half of my character still goes through the wall before it acutally calls the code

how do i stop this?

please help

thanks Hopies