Which I thought was going to be really easy. Then I learn the error is probably not the type to be handled by try... catch. Sooooo I try listening for the event, but it doesn't seem to care for my AsyncErrorEvent or how I've done it below with the IOErrorEvent...
Still gives me "Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found."
What am I doing wrong? I looked at the senocular (http://www.senocular.com/flash/tutor...?page=3#errors) tut,and thought it may be something to do with "new Loader()", bit I can't seem to comeup with a way around that.
Code:function upHandler_SmallSite(event:MouseEvent):void { //load the image for this location var pictLdr:Loader = new Loader(); var pictURL:String = "images/" + aList[array.indexOf(event.target)].@id + ".jpg"; var pictURLReq:URLRequest = new URLRequest(pictURL); pictLdr.load(pictURLReq); pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded); pictLdr.addEventListener(IOErrorEvent.IO_ERROR, loadIOError); mcBigInfoBox.mcBigInfo_Image.addChild(pictLdr); } // Handler for IO error function loadIOError(event:IOErrorEvent):void { trace("ErroR"); }





Reply With Quote