# Can't Load XML value into MovieClipLoader Object

**URL:** <https://forum.kirupa.com/t/cant-load-xml-value-into-moviecliploader-object/192627>\
**Category:** flash\
**Created:** [June 29, 2006, 9:30pm UTC](https://forum.kirupa.com/t/cant-load-xml-value-into-moviecliploader-object/192627 "2006-06-29T21:30:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tfoston](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tfoston/32/2516_2.png) [@tfoston](https://forum.kirupa.com/u/tfoston)\
**Post date:** [June 29, 2006, 9:30pm UTC](https://forum.kirupa.com/t/cant-load-xml-value-into-moviecliploader-object/192627/1 "2006-06-29T21:30:41Z")

</div>

I’m trying make a XML driven gallery. The XML files loads just fine. When I use the pics\_mc.loadMovie(xmlnode) function, it works perfect. The problem is, I want to use the MovieClipLoader Object, and that doesnt seem to work at all. Here’s the code

stop();  
\_root.createEmptyMovieClip(“pics\_mc”,this.getNextHighestDepth()) //empty movie where i dump imported jpg’s into  
\_global.g = 2 //variable to change the gallery  
\_global.p = 3 //variable to change the picture  
//////////////////////////////////////  
// Using the MovieClipLoader Class //  
//////////////////////////////////////  
var mymcl:MovieClipLoader = new MovieClipLoader()  
var mylist:Object = new Object()  
mymcl.addListener(mylist)  
mylist.onLoadError = function(){  
trade(“there was an error opening the file”)  
}  
var progress = mymcl.getProgress(pics\_mc)  
trace(progress.bytesTotal)  
mylist.onLoadInit = function(){  
trace(“the jpg has loaded”)  
}

//////////////////////////////////////  
// The XML Gallery Information //  
//////////////////////////////////////  
var numofgall = myxml.firstChild.childNodes.length //max number of galleries  
var numofpics = myxml.firstChild.childNodes[g].childNodes.length //max number of pics in each gallery  
var xmlnode = myxml.firstChild.childNodes[g].childNodes[p].firstChild //picture being viewed by visitor

//////////////////////////////////////  
// Gallery Functions //  
//////////////////////////////////////

mymcl.loadClip(xmlnode, pics\_mc) //this doesnt work at all  
//pics\_mc.loadMovie(xmlnode) //this works just fine, but not what i want to use
