# Loading Library items via an Array

**URL:** <https://forum.kirupa.com/t/loading-library-items-via-an-array/289238>\
**Category:** flash\
**Created:** [May 27, 2009, 9:11pm UTC](https://forum.kirupa.com/t/loading-library-items-via-an-array/289238 "2009-05-27T21:11:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [May 27, 2009, 9:11pm UTC](https://forum.kirupa.com/t/loading-library-items-via-an-array/289238/1 "2009-05-27T21:11:33Z")

</div>

Hello!  
I used to put a load of instance names linking to library objs into an array in AS2, then use a loop to add them to the stage…

I htought this would work in AS3, alas no.

```auto
var list:Array new Array("one", "two","three");
for(var i:int=0;i<list.length;i++)
{
  this["emptyClip"+i] = new MovieClip();
  this["emptyClip"+i].x = i*50;
  this["emptyClip"+i].addChild(list*);
  addChild(this["emptyClip"+i]);
}

```

“one”,“two” etc are the names of the images in the library … //:block:

It’s hard to find out the new ways of approaching the old AS2 methods … Thanks for any help
