# Odd object hit test

**URL:** <https://forum.kirupa.com/t/odd-object-hit-test/203086>\
**Category:** Uncategorized\
**Created:** [October 7, 2006, 11:15am UTC](https://forum.kirupa.com/t/odd-object-hit-test/203086 "2006-10-07T11:15:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imb0red123](https://avatars.discourse-cdn.com/v4/letter/i/ecd19e/32.png) [@imb0red123](https://forum.kirupa.com/u/imb0red123)\
**Post date:** [October 7, 2006, 11:15am UTC](https://forum.kirupa.com/t/odd-object-hit-test/203086/1 "2006-10-07T11:15:51Z")

</div>

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.
