Hi I am trying to implement some error handling into my code.
[URL=“http://www.kirupa.com/forum/showthread.php?p=1957523”]
I am still getting the error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
I want to be able to feed invalid URLs into the loader without it causeing a problem.
Here is the relevant (?) extract of my code:
{
var image_url = kanaImages[imageCount].@IMAGE;
image_loader = new Loader();
image_loader.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
image_loader.load(new URLRequest(image_url));
image_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
}
private function catchIOError(event:IOErrorEvent)
{
trace("Error caught: "+event.type); // this never gets triggered.
}
This works fine with valid URLs.
I was trying to do as Senocular describes here:
[COLOR=#800080]http://www.kirupa.com/forum/showthread.php?p=1957523[/COLOR]
Thank you for taking the time to look at this problem!
S.