I am trying to load external jpegs into dynamically created movie clips, the number of movie clips depends on the number of childNodes, the variable totalImages is being set to the correct number but I dont know why i cant use this variable later on to create the right number of movie clips, here is the code-
//load xml file
images_xml = new XML();
images_xml.onLoad = startImageViewer;
images_xml.load(“xml/images.xml”);
images_xml.ignoreWhite = true;
function startImageViewer(success) {
if (success == true) {
rootNode = images_xml.firstChild;
[COLOR=Red]totalImages[/COLOR] = rootNode.childNodes.length;
firstImageNode = rootNode.firstChild;
}
}
for(i=0;i<[COLOR=Red]totalImages[/COLOR];i++){
_root.createEmptyMovieClip(“holder”+i, 100+i);
_root[“holder”+i]._x=i*100;
_root[“holder”+i]._y=100;
}