It works fine if I wait until the image is actually loaded (loadComplete) and then push the bitmap I create. If I try to push the loaders like you see here, it freezes up, every time.
for (var i:uint=0; i<loaderArrayMAINCARDS.length; i++) {
var iconLoader = new Loader();
iconLoader.load(new URLRequest(urlArray*));
iconLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
iconLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
invArrayMAIN.push(iconLoader);
}
}
private function loadComplete(e:Event) {
// do nothing in this example
}
Any ideas?
Here is the code that works, if I let the load complete-
private function loadComplete(e:Event) {
bitMap = Bitmap(e.target.content);
bitMap.smoothing = true;
invArrayMAIN.push(bitMap); // pushing the bitmap here, not the loader
}