# Collision Detection Problem

**URL:** <https://forum.kirupa.com/t/collision-detection-problem/186750>\
**Category:** Uncategorized\
**Created:** [April 24, 2006, 11:26am UTC](https://forum.kirupa.com/t/collision-detection-problem/186750 "2006-04-24T11:26:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcem](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@dcem](https://forum.kirupa.com/u/dcem)\
**Post date:** [April 24, 2006, 11:26am UTC](https://forum.kirupa.com/t/collision-detection-problem/186750/1 "2006-04-24T11:26:13Z")

</div>

I am having trouble getting the collision detection working for my portfolio site. I want it so that when one square is over another it moves to another location. This is because the squares are going to be buttons and i cant have buttons covering each other.

help would really be appreciated, i am going crazy trying to figure out what i am doing wrong! :puzzle:

here is a link to the files, the hit test function is in Square.as line 78.  
[http://www.dcem.net/dcemprob.zip](http://www.dcem.net/dcemprob.zip)

Thanks!

Dave
