Odd object hit test

okay ive looked at tutorials on hittest and how to stop a movie clip from moving when it hits a wall and stuff but none of it can tell me how to make a movie clip stop moving when it hits any side of an odd shaped movie clip. for example, i have the moving clip, guy, with this code:

onClipEvent (load) {
walkSpeed = 15;
}
onClipEvent (enterFrame) {
if (root.hit=“no” and Key.isDown(Key.UP)) {
_y -= walkSpeed;
}
if (Key.isDown(key.RIGHT)) {
_x += walkSpeed;
}
if (Key.isDown(key.LEFT)) {
_x -= walkSpeed;
}
if (Key.isDown(key.DOWN)) {
_y += walkSpeed;
}
}

and i have another clip, table, which is an L shaped movie clip and i want the guy to not move through any side of the table… sounds simple enough. but nowhere i have looked can explain how to do this.