# XML driven gallery

**URL:** <https://forum.kirupa.com/t/xml-driven-gallery/254135>\
**Category:** Uncategorized\
**Created:** [March 8, 2008, 12:18pm UTC](https://forum.kirupa.com/t/xml-driven-gallery/254135 "2008-03-08T12:18:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adonweb](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adonweb](https://forum.kirupa.com/u/adonweb)\
**Post date:** [March 8, 2008, 12:18pm UTC](https://forum.kirupa.com/t/xml-driven-gallery/254135/1 "2008-03-08T12:18:26Z")

</div>

I am trying to create XML driven image gallery using AS2. Here is my code.

var myxml:XML=new XML();  
myxml.ignoreWhite=true;  
myxml.load(“gal2.xml”);  
myxml.onLoad=function(success)  
{  
xmlnode=this.firstChild;  
leng=xmlnode.childNodes.length;  
image=[];  
for(i=0;i\<leng;i++)  
{  
image\*=xmlnode.childNodes\*.firstChild.nodeValue;  
img\_mc.createEmptyMovieClip(“p\_mc”+i,img\_mc.getNextHighestDepth());  
eval(“p\_mc”+i).loadMovie(image\*)  
}  
}

but it cannot display anything on the stage. Please help me.

Thanks in advance
