# Matching two movie clips

**URL:** <https://forum.kirupa.com/t/matching-two-movie-clips/279451>\
**Category:** Uncategorized\
**Created:** [January 14, 2009, 8:51pm UTC](https://forum.kirupa.com/t/matching-two-movie-clips/279451 "2009-01-14T20:51:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gencoglu](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@gencoglu](https://forum.kirupa.com/u/gencoglu)\
**Post date:** [January 14, 2009, 8:51pm UTC](https://forum.kirupa.com/t/matching-two-movie-clips/279451/1 "2009-01-14T20:51:44Z")

</div>

[FONT=Calibri][SIZE=3]Hi,[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]I have two arrays of MCs….what I’m tring to achieve is to match the m1 and z1,m2 and z2….m5 and z5….and if match I want the relevent member of myArray2 to be unload…( I mean 1 to unload 1, 2 unload 2)…and so on….But here m1 unload all the mcs of myArray2……[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]Any idea ?[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]thanks[/SIZE][/FONT]  
[FONT=Calibri][SIZE=3]

```php

myArray = new Array(m1, m2, m3, m4, m5);
myArray2 = new Array(z1,z2, z3, z4, z5);
for (i=0; i<=myArray.length; i++) {
                myArray*.onPress = function() {
                               this.startDrag();
                               this.onEnterFrame = function() {
                                               for (var i = 0; i<myArray.length; i++) {
                                                               if (this.hitTest(myArray2*)) {
                                                                              
                                                                              _root.kutu.text = this._name+" ....is hitting.... "+myArray2*._name;
                                                               unloadMovie(myArray2*);
                                                               }
                                               }
                               };
                };myArray*.onRelease = function() {
                               stopDrag();
                };
                
}

```

[/SIZE][/FONT]
