# AS3 loading image from Array into empty movieclip

**URL:** <https://forum.kirupa.com/t/as3-loading-image-from-array-into-empty-movieclip/319840>\
**Category:** flash\
**Created:** [March 6, 2011, 11:48am UTC](https://forum.kirupa.com/t/as3-loading-image-from-array-into-empty-movieclip/319840 "2011-03-06T11:48:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WILWILWEL](https://avatars.discourse-cdn.com/v4/letter/w/a88e4f/32.png) [@WILWILWEL](https://forum.kirupa.com/u/WILWILWEL)\
**Post date:** [March 6, 2011, 11:48am UTC](https://forum.kirupa.com/t/as3-loading-image-from-array-into-empty-movieclip/319840/1 "2011-03-06T11:48:13Z")

</div>

I’m converting Kirupa tutorial for AS2/XML gallery to a AS3 image gallery that works with AMFPHP.

I’m running into a output error:TypeError: Error #1010

After some searching I found out that the script says that there’s a undefined propperty in the script below.

It should load an image from the Array “Image” in a empty movieclip wich excists on stage called “picture”

**[COLOR=#ff0000][“picture”+0] is also used in other parts but then as [“picture”+p].[/COLOR]**  
**[COLOR=#ff0000]P=0 with an increment based on button clicks (previous and next)[/COLOR]**

> 

```
          function firstImage() { 
          if (this.loaded == this.filesize) { 
          picture.alpha = 0; 
          var loader:Loader = new Loader();
          [COLOR=red]**this["picture"+0].addChild(loader);

```

\*\*[/COLOR] loader.load(new URLRequest(image[p]));;  
desc\_txt.text = description[0];  
beschrijf\_txt.text = beschrijf[0];  
picture\_num();  
}  
}
