Question : 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!
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
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");
			
			
		}
Open in New Window Select All

Answer : IOErrorEvent not working

try this instead.
ldr.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, ldrIoErrorHandler );
Random Solutions  
 
programming4us programming4us