# Can't reference a movie clip array via for loop

**URL:** <https://forum.kirupa.com/t/cant-reference-a-movie-clip-array-via-for-loop/214869>\
**Category:** Uncategorized\
**Created:** [February 1, 2007, 4:40pm UTC](https://forum.kirupa.com/t/cant-reference-a-movie-clip-array-via-for-loop/214869 "2007-02-01T16:40:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coche](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@coche](https://forum.kirupa.com/u/coche)\
**Post date:** [February 1, 2007, 4:40pm UTC](https://forum.kirupa.com/t/cant-reference-a-movie-clip-array-via-for-loop/214869/1 "2007-02-01T16:40:23Z")

</div>

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
