# Movieclip with same Instance name HELP

**URL:** https://forum.kirupa.com/t/movieclip-with-same-instance-name-help/301194
**Category:** Uncategorized
**Created:** [December 4, 2009, 7:57pm UTC](https://forum.kirupa.com/t/movieclip-with-same-instance-name-help/301194 "2009-12-04T19:57:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lartaboi](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@lartaboi](https://forum.kirupa.com/u/lartaboi)
#### Post date: [December 4, 2009, 7:57pm UTC](https://forum.kirupa.com/t/movieclip-with-same-instance-name-help/301194/1 "2009-12-04T19:57:24Z")

</div>

I have got one movieclip that is a square it is 20 x 20 the movieclip changes from black to white when you roll over it and remains white.

The problem i have is that i need 3000 of them and putting them in a grid format so the user can create there own black and white mosaic.

But when i do it only the newest square added to the stage changes colour i think i have gone down the wrong path and ive hit a dead end, please help!

This is my code (Which im 90% is all wrong):

```php

stop();

var sqreArray:Array = new Array();

for (var i:int = numChildren - 0; i >= 3000; i++) {
    var child:DisplayObject = getChildAt(i);
    if (child.name == "sqre") {
        sqreArray.push(child);
    }
}

function sqreOver(event:MouseEvent):void {
sqre.gotoAndStop('over');
}

function sqreOut(event:MouseEvent):void {
sqre.gotoAndStop('out');
}
    
    
sqre.addEventListener(MouseEvent.ROLL_OVER, sqreOver);
sqre.addEventListener(MouseEvent.ROLL_OUT, sqreOut); 

```
