Hello! First question here; hope you can help. I'm completely flummoxed.
I created a flash slideshow which preloads the images. After preloading the images, it proceeds to load an external flash file and then the images. The problem is, very very occasionally, it will fail to actually load the images into view, and I'll just see the preloading animation, but it might still load the external swf. Additionally, it might do the reverse, and load the images and not load the external swf.
I have no been able to reproduce the latter, although the client has noticed it on a few occasions. The former will happen for me, but only very rarely.
Here is the (I think) relevant code:
function onXMLLoadComplete(e:Event):void {
// create new xml with the received data
xmlSlideshow = new XML(e.target.data);
// get total slide count
// misc xml data
info_holder.mcInfo.lbl_tagline.text = xmlSlideshow.misc.@tagline;
info_holder.mcInfo.goToUrl_btn.lbl_view.text = [email protected]();
intSlideCount = xmlSlideshow..img.length();
//trace(intSlideCount);
imageArray = new Array(intSlideCount);
for (var i:int = 0; i < intSlideCount; i++) {
//imageArray[i] = new URLRequest(xmlSlideshow..img[i].@src);
var loader:Loader = new Loader();
loader.load(new URLRequest(xmlSlideshow..img[i].@src));
//trace(xmlSlideshow..img[i].@src);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoadComplete);
//loader.load(imageArray[i]);
}
}
function onImageLoadComplete(e:Event):void {
if (++numberOfImagesLoaded == intSlideCount) {
// animate the info bar and then
//trace(intSlideCount);
//trace(numberOfImagesLoaded);
info_holder.play();
// switch the first slide without a delay
// reset index of images
//load map div via jQuery
if (ExternalInterface.available) {
ExternalInterface.call('openMap');
}
intCurrentSlide = -1;
switchSlide(null);
}
}
The live site is here: http://www.luxuryportfolio.com - see if any of you can reproduce the above issues...
Thanks!!