# attachMovie with an array (CS4, AS2)

**URL:** <https://forum.kirupa.com/t/attachmovie-with-an-array-cs4-as2/320406>\
**Category:** flash\
**Created:** [March 22, 2011, 6:35pm UTC](https://forum.kirupa.com/t/attachmovie-with-an-array-cs4-as2/320406 "2011-03-22T18:35:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skarab](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Skarab](https://forum.kirupa.com/u/Skarab)\
**Post date:** [March 22, 2011, 6:35pm UTC](https://forum.kirupa.com/t/attachmovie-with-an-array-cs4-as2/320406/1 "2011-03-22T18:35:12Z")

</div>

I’ve been trying to use attachMovie with an array and can’t seem to get anywhere with it. First I’ve got mc’s loading a set of buttons with attachMovie which I’ve got written like this, using an array:

```auto
for (i=0; i<testInfo.length; i++) {
    attachMovie("container", "new"+i, i, {_x:xPos, _y:yPos});
    yPos += this["new"+i]._height+20;
    this["new"+i].title_txt.text = testInfo*[0];
    this["new"+i].desc_txt.text = testInfo*[1];
    this["new"+i].image = testInfo*[2];
        };

```

And that works fine. Then inside the mc’s that load, there is a button which uses this:

```auto
loadPic_btn.onRelease = function(){
    this.imageHolder_mc.attachMovie("image", "image", 5);
    };

```

So the array’s third node, which is a linkage identifier, is called “image” in the for loop, which _should_ access the mc from the library, but it refuses to work.

Any help would be appreciated.
