I’m not sure but I think flash is playing tricks with me.
flash tells me at the end of every cycle of 4 images that it couldn’t load the fifth image, which is true because there isn’t supposed to be a fifth image…
well here is the code maybe you see the fatal error:D
stop();
//variables//////////////////////////////////////
t = timer[p]*1000;
//preloader//////////////////////////////////////
loaded = Math.round(_root.getBytesLoaded());
filesize = Math.round(_root.getBytesTotal());
total_percent = (loaded/filesize)*100;
_root.loaded_txt = Math.round(total_percent);
if (loaded === filesize) {
preloader._visible = false;
preloader_txt._visible = false;
beschrijving_mc._visible = true;
beschrijving_txt._visible = true;
preloader_bg._visible = false;
if (beschrijving_logo._alpha<90) {
beschrijving_logo._alpha += 10;
}
ID = setInterval(function () {
gotoAndPlay(3);
}, t);
slide();
} else {
preloader._visible = true;
preloader_txt._visible = true;
beschrijving_mc._visible = false;
beschrijving_txt._visible = false;
if (beschrijving_logo._alpha>0) {
beschrijving_logo._alpha -= 10;
}
reloader_bg._visible = true;
}
//image switching////////////////////////////////////
mc_x = mc._x;
mc_y = mc._y;
mc_width = mc._xscale;
mc_height = mc._yscale;
function slide() {
if (loaded_bytes == loaded_total) {
mc.loadMovie(dia[p]);
beschrijving_text = (beschrijving[p]);
mc_x = mc._x;
mc_y = mc._y;
mc_width = xwidth[p]*(mc._xscale/100);
mc_height = yheight[p]*(mc._yscale/100);
scale();
if (p !== _global.total) {
p == p++;
} else {
p = 0;
}
}
}
function scale() {
//variables/////////////////////////////////////
total_width = 550;
total_height = 400;
mc_yscale = mc._yscale;
mc_xscale = mc._xscale;
mc_xw = mc_width/total_width;
mc_yh = mc_height/total_height;
//calculation///////////////////////////////////
mc._yscale = mc_yscale/mc_yh;
mc._xscale = mc_xscale/mc_xw;
locate();
}
function locate() {
mc_width = xwidth[p]*(mc._xscale/100);
mc_height = yheight[p]*(mc._yscale/100);
mc._x = mc_x-(mc_width/2);
mc._y = mc_y-(mc_height/2);
}
that is the code for loading, and switching the images
stop();
//XML////////////////////////////////////////////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
dia = [];
beschrijving = [];
timer = [];
xwidth = [];
yheight = [];
_global.total = xmlNode.childNodes.length;
for (i=0; i<_global.total; i++) {
dia* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
beschrijving* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
timer* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
xwidth* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
yheight* = xmlNode.childNodes*.childNodes[4].firstChild.nodeValue;
}
gotoAndPlay(2);
} else {}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("RWE slideshow.xml");
//var////////////////////////////////////////////
p = 0;
and that is the code that loads the XML into array’s
Well i really hope you can see the mistake because its a bit fuzzy inside my head now:D