# Array Help

**URL:** https://forum.kirupa.com/t/array-help/233666
**Category:** Uncategorized
**Created:** [July 25, 2007, 8:56pm UTC](https://forum.kirupa.com/t/array-help/233666 "2007-07-25T20:56:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lfc611](https://avatars.discourse-cdn.com/v4/letter/l/8491ac/32.png) [@lfc611](https://forum.kirupa.com/u/lfc611)
#### Post date: [July 25, 2007, 8:56pm UTC](https://forum.kirupa.com/t/array-help/233666/1 "2007-07-25T20:56:20Z")

</div>

if someone could help me out and tell me what im doing wrong i’d appreciate it  
thanks

what im trying to do is:  
attach 4 mc’s, then create a blank mc called “mcClip” in each of the 4 attached mc’s  
then the onRelease button is going to load an mc into mcClip  
(hope that makes sense)

this is what i have  
everything works except for the onRelease part

```auto

var mcLoad:Array = Array("", "mc1", "mc2", "mc3", "mc4");
var holder:Number = mcLoad.length;
var xPos = 0;
var yPos = 0;
var currentXpos = 0;
var currentYpos = 0;
var squareWidth = 50;
var squareHeight = 50;

attachMovie("mc1", "new1", 1, {_x:xPos, _y:yPos});
xPosNew = this.new1._width+5;
yPosNew = this.new1._height+5;

attachMovie("mc2", "new2", 2, {_x:xPosNew, _y:yPos});
attachMovie("mc3", "new3", 3, {_x:xPos, _y:yPosNew});
attachMovie("mc4", "new4", 4, {_x:xPosNew, _y:yPosNew});

for(i=1; i<holder; i++){
    this["new"+i].createEmptyMovieClip("mcClip", this.getNextHighestDepth());
    trace(mcLoad*); // displays mc1,mc2,mc3,m4
    this["new"+i].onRelease = function(){
        this["new"+i].loadMovie(mcLoad* + ".swf", mcClip);
        trace(mcLoad*); // displays undefined
    }
}

```

thanks again
