Hey folks,
I have a really frustrating issue here. I am looking at code that is as follows:
function loadImage(req:URLRequest){
trace(req.url);
var imageloader:Loader = new Loader();
imageloader.load(req);
imageloader.addEventListener(IOErrorEvent.IO_ERROR, errorFunc);
function errorFunc(e:Event){
imageloader.load(new URLRequest("gfx/default.jpg"));
trace("pass");
//trace(e);
}
addChild(imageloader);
}
The idea being that, if I make a request for an image and it isn’t existing, then I don’t want the entire movie to crash. However, the IOErrorEvent.IO_ERROR is not catching my fail errors. I keep getting this message:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
I know that the URL is not found! How do I make this work?
Thanks in advance!!!
-Carmire