compsci
12-22-2008, 02:04 PM
Hello all,
I load images like this:
var imageLoader = new Loader();
imageLoader.load(new URLRequest(path));
imageLoader.contentLoaderInfo.addEventListener(IOE rrorEvent.IO_ERROR, imageNotFound);When there is an IOErrorEvent, I want to load another image saying image not available, how can I do this?function imageNotFound(ev:Event):void {
trace('Image Not Found, use not available image');
ev.target.loader.load(new URLRequest('../images/image_not_available.gif'));
}
With the above I get the error:
Error: Error #2099: The loading object is not sufficiently loaded
to provide this information.
at flash.display::LoaderInfo/get loader()
at test2_fla::MainTimeline/imageNotFound()
Any work arounds???
I load images like this:
var imageLoader = new Loader();
imageLoader.load(new URLRequest(path));
imageLoader.contentLoaderInfo.addEventListener(IOE rrorEvent.IO_ERROR, imageNotFound);When there is an IOErrorEvent, I want to load another image saying image not available, how can I do this?function imageNotFound(ev:Event):void {
trace('Image Not Found, use not available image');
ev.target.loader.load(new URLRequest('../images/image_not_available.gif'));
}
With the above I get the error:
Error: Error #2099: The loading object is not sufficiently loaded
to provide this information.
at flash.display::LoaderInfo/get loader()
at test2_fla::MainTimeline/imageNotFound()
Any work arounds???