# Need Help with dynamic loaded images?

**URL:** https://forum.kirupa.com/t/need-help-with-dynamic-loaded-images/237845
**Category:** flash
**Created:** [September 4, 2007, 4:28pm UTC](https://forum.kirupa.com/t/need-help-with-dynamic-loaded-images/237845 "2007-09-04T16:28:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![GiXxXmO](https://avatars.discourse-cdn.com/v4/letter/g/82dd89/32.png) [@GiXxXmO](https://forum.kirupa.com/u/GiXxXmO)
#### Post date: [September 4, 2007, 4:28pm UTC](https://forum.kirupa.com/t/need-help-with-dynamic-loaded-images/237845/1 "2007-09-04T16:28:13Z")

</div>

a want to make a site depending on what an xml wants.  
(reading in the website from an xml)  
the problem is when i load an image the last image is only visible.  
i think it depends on it have the same name. but i cant have static names because i dont know how many pictures i want to load.

here is the code btw? please help! GiXxXmO

var myLoader:Loader = new Loader();  
var [url:string](http://www.kirupa.com/forum/string) = xml.attribute(“picture”).toString();  
var urlReq:URLRequest = new URLRequest(url);  
myLoader.load(urlReq);  
myLoader.contentLoaderInfo.addEventListner(Event.COMPLETE, imgLoaded);

function imgLoaded(event:Event):void  
{  
addChild(myLoader);

}
