这里的第一个问题;希望你能帮忙。我完全糊涂了。
我创建了一个预加载图像的 Flash 幻灯片。预加载图像后,它会继续加载外部闪存文件,然后加载图像。问题是,非常非常偶尔,它实际上无法将图像加载到视图中,我只会看到预加载动画,但它可能仍会加载外部 swf。此外,它可能会执行相反的操作,并加载图像而不加载外部 swf。
我无法重现后者,尽管客户已经注意到了几次。前者会发生在我身上,但很少发生。
这是(我认为)相关代码:
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 = xmlSlideshow.misc.@view.toUpperCase();
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);
}
}
现场网站在这里:http ://www.luxuryportfolio.com - 看看你们中是否有人可以重现上述问题......
谢谢!!