Hi! Well, strange little problem.
I made a small class to preload external assets (swf/jpg/xml…). It works really well for me on-line.
BUT, every time I test it locally (in the flash) with test movie > simulate download, I works properly (it correctly loads the assets), but I always get this error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.
But I repeat: files load correctly. So, what’s going on? NOTE that in my code there’s also the IOErrorEvent listener, that, when I for exemple I pass a wrong path, it is dispatched (this mean it works). But It doesn’t get dispatched here, just because the asset in fact loads.
a piece of code:
public function loadExtDisplay(file){
loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoadProgress, false, 0, true);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete, false, 0, true);
loader.contentLoaderInfo.addEventListener(Event.INIT, onLoadInit, false, 0, true);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onIOError);
loader.load(new URLRequest(file));
dispatchEvent(new Event(FileLoader.LOAD_START));
busy = true;
return loader;
}
public function onIOError(e:IOErrorEvent):void{
e.text = 'I/O ERROR';
}
What’s the problem?