Can't reference a movie clip array via for loop

Hello everybody, I have this problem since many weeks ago, I can’t figure out how to resolve it. My partial code is:

[COLOR=Blue] function[/COLOR] checkCollision(rect) {
[COLOR=Blue] for[/COLOR](j=0; j < drop.length; j++) {
temp2 = [COLOR=Blue]eval/COLOR;
[COLOR=Blue] if[/COLOR]([COLOR=Blue]eval/COLOR == temp2){
rect.[COLOR=Blue]_x[/COLOR] = temp2.[COLOR=Blue]_x[/COLOR];
rect.[COLOR=Blue]_y[/COLOR] = temp2.[COLOR=Blue]_y[/COLOR];
}
[COLOR=Blue] else[/COLOR] {
rect.[COLOR=Blue]_x [/COLOR]= rect.origX;
rect.[COLOR=Blue]_y [/COLOR]= rect.origY;
}
}
}

I send to the function a movie clip that I use for drag and drop, so when I drop this function is called. The problem is that of the three rectangles that I use for contain the others, only the last senses the drop target. I read the Canadian post of frequently asked questions, and one of the questions is very similar, but I can’t figure out how to apply it here. Any help please. Thanks