Hey, with this code(below) I am trying to load images into multi-dimensional arrays that will be used in another class… hopefully my code will explain my intent.
Anyways, at runtime I’m getting the Error #2044 Unhandled IOErrorEvent: Load Never Completed. I’ve got this error many times before, and I somehows always fix it, but have never been able to figure out the problem…
Any help would be appreciated, I’ve been working on this pretty much all day so my brain may be fried and I’m missing something simple, but regardless, it’s quite annoying.
private function getFullThumbs():void {
addEventListener(Event.ENTER_FRAME, checkFullLoaded);
for (var i:int = 0; i < 5; i++) {
fullImageLoaders* = [];
fullThumbLoaders* = [];
fullThumbs* = [];
fullImages* = [];
for (var j:int = 0; j < 4; j++) {
var fullImageUrl:String = new String(base_url + "/img/" + i +"/full" + j + ".jpg");
var fullThumbUrl:String = new String(base_url + "/img/" + i + "/thumb" + j + ".jpg");
fullThumbLoaders*[j] = new Loader();
fullThumbLoaders*[j].contentLoaderInfo.addEventListener(Event.COMPLETE, fullImageComplete(i, j));
fullThumbLoaders*[j].load(new URLRequest(fullImageUrl));
fullImageLoaders*[j] = new Loader();
fullImageLoaders*[j].contentLoaderInfo.addEventListener(Event.COMPLETE, fullThumbComplete(i, j));
fullImageLoaders*[j].load(new URLRequest(fullThumbUrl));
}
}
}
private function fullThumbComplete(imageSet:Number, thumb:Number):Function {
return function(e:Event):void {
fullThumbs[imageSet][thumb] = new Sprite();
fullThumbs[imageSet][thumb].addChild(new Bitmap(e.target.loader.contentLoaderInfo.content.bitmapData, "auto", true));
fullThumbsLoaded++;
}
}
private function fullImageComplete(imageSet:Number, thumb:Number):Function {
return function(e:Event):void {
fullImages[imageSet][thumb] = new Sprite();
fullImages[imageSet][thumb].addChild(new Bitmap(e.target.loader.contentLoaderInfo.content.bitmapData, "auto", true));
fullImagesLoaded++;
}
}