Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

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!
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

0
walker6o9
Asked:
walker6o9
  • 3
  • 2
1 Solution
 
blue-genieCommented:
does that if condition get met for the listener to trigger?
0
 
walker6o9Author Commented:
yes
0
 
blue-genieCommented:
try this instead.
ldr.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, ldrIoErrorHandler );
0
 
walker6o9Author Commented:
NAILED IT
0
 
blue-genieCommented:
f*$!_ AS3.
the loader object itself doesn't register for events - it's content does. - go figure. one for the Adobe geeks to explalin.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now