This would be my first time working with preloaders, and I’ve read several tutorials but it just isn’t clicking with me. I have the preloading animation down and all, but I’m unsure just how to get the preloader working with my content.
You can see the file I’m working on at http://www.joeb.uni.cc/flash
This is my actionscript code:
var featuresUrl:String = "nodes.xml";
var featuresArr:Array = new Array();
var myDate:Date = new Date()
//var timestring:String = ""+myDate.valueOf()
var timestring:String = "";
var featuresXML:XML = new XML();
featuresXML.ignoreWhite = true;
featuresXML.onLoad = function (success:Boolean) {
if (success) {
var featuresNode:XMLNode = featuresXML.firstChild;
var featureObj:Object = new Object();
for (var aNode:XMLNode = featuresNode.firstChild; aNode != null; aNode = aNode.nextSibling) {
featureObj = new Object();
featureObj.img = aNode.attributes.img;
featureObj.title = aNode.attributes.title;
featureObj.description = aNode.attributes.description;
featuresArr.push(featureObj);
}
_level10.tit.text = featuresArr[0].title;
var temp;
var mc;
var mcLoader:MovieClipLoader = new MovieClipLoader();
for (var i = 0; i < 5; i++) {
temp = _level0["B"+(i+1)];
temp.buttonval = i;
mc = _level0.img_container_mc.createEmptyMovieClip("img"+i+"_mc", -5+i)
mcLoader.loadClip(featuresArr*.img, mc);
mc._visible = false;
temp.img = mc;
temp.onRelease = function () {
_level0.tit.text = featuresArr[this.buttonval].title;
_level0.des.text = featuresArr[this.buttonval].description;
_level0.cur_selected.img._visible = false;
_level0.cur_selected = this;
this.img._visible = true;
}
}
_level0.cur_selected = temp;
temp.img._visible = true;
}
};
featuresXML.load(featuresUrl+timestring);
// trace(_level0.B1.getDepth())
Any help on this would be greatly appreciated.