Hit test problem

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

Thanks!

Dave

Here is the function itself that is in the external class file Square.as:

function hitTester(){
tempA = this.
//array filled with the names of each
numSquare = _rootALL.SquareNames.length;

Here is the function itself that is in the external class file Square.as:

function hitTester(){
tempA = this.
//array filled with the names of each
numSquare = _rootALL.SquareNames.length;

Here is the function itself that is in the external class file Square.as:

function hitTester(){
tempA = this.
//array filled with the names of each object instance to be tested for hit
numSquare = _rootALL.SquareNames.length;
for(i=0; i<numSquare; i++){
if(i != ArrayNo){
tempB = root.ALL.SquareNames[i[;
if(tempA.hitTest(tempB)){
//function to move offending square
moveSquare
}
}
}

now it runs the for loop and gets the names of each of the squares but doesnt seem to register when on hits another. HEEEEELP!