walker6o9
asked on
IOErrorEvent not working
For some reason my IO Error handler isn't working, and I'm getting
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
The files I'm looking for aren't supposed to be there, but I should at least get THUMB ERROR to show up in my debugger!
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
The files I'm looking for aren't supposed to be there, but I should at least get THUMB ERROR to show up in my debugger!
public function loadThumb(evt:ListEvent) {
if ( evt.item.thumb != null && evt.item.thumb != "" ) {
this.thumbNail = this["thumb" + this.bladeNumber];
var ldr:Loader = new Loader();
ldr.addEventListener( IOErrorEvent.IO_ERROR, ldrIoErrorHandler );
ldr.contentLoaderInfo.addEventListener( Event.COMPLETE, thumbLoaded );
evt.item.thumb = "\\"+ evt.item.thumb;
var myRequest = new URLRequest( evt.item.thumb );
ldr.load( myRequest );
this.thumbNail.image.addChild( ldr );
}
}
public function ldrIoErrorHandler(event:IOErrorEvent):void {
trace("THUMB ERROR");
}
does that if condition get met for the listener to trigger?
ASKER
yes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
NAILED IT
f*$!_ AS3.
the loader object itself doesn't register for events - it's content does. - go figure. one for the Adobe geeks to explalin.
the loader object itself doesn't register for events - it's content does. - go figure. one for the Adobe geeks to explalin.