i want preloaders for my external jpgs but also need to load them one by one, not random. i found some samples but they are more complex. i just want to do it with very simple way. there is an example http://www.ovalpartnership.com/main.php?lang=eng .
this is my code.
x_space = 0;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
id = xmlNode.childNodes*.attributes.id;
holder.attachMovie("intro_imgs","image"+i,i,{_x:x_space, _y:0});
var mcLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
mcLoader.addListener(listener);
mcLoader.loadClip("prj_imgs/"+id+"_1.jpg",holder["image"+i].img_holder);
listener.onLoadStart = function(target_mc:MovieClip) {
holder["image"+i].bar._xscale = 0;
};
listener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
holder["image"+i].bar._xscale = Math.round(bytesLoaded/bytesTotal*100);
};
listener.onLoadComplete = function(target_mc:MovieClip) {
holder["image"+i].bar.removeMovieClip();
};
x_space = x_space+300;
}
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("projects.xml");