# Rectangle Hit Test

**URL:** <https://forum.kirupa.com/t/rectangle-hit-test/288437>\
**Category:** flash\
**Created:** [May 15, 2009, 4:04pm UTC](https://forum.kirupa.com/t/rectangle-hit-test/288437 "2009-05-15T16:04:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DashMasterful](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DashMasterful](https://forum.kirupa.com/u/DashMasterful)\
**Post date:** [May 15, 2009, 4:04pm UTC](https://forum.kirupa.com/t/rectangle-hit-test/288437/1 "2009-05-15T16:04:43Z")

</div>

I have a basic problem, I’m hit testing two rectangles. There is a static rectangle and one that moves, basically the moving rectangle can come in from any direction and hit the static one. I find that the moving box will actually get stuck to the static one, is there a way to push the moving box out once it hits the static box so that it is not technically hit testing anymore, I know there was a way to do this with circles, but I wasn’t sure about rectangles. Please take a look at the temp .swf i created

[http://ec2-72-44-50-95.z-1.compute-1.amazonaws.com/test.swf](http://ec2-72-44-50-95.z-1.compute-1.amazonaws.com/test.swf)
