Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

IOErrorEvent not working

Posted on 2008-10-14
5
Medium Priority
?
317 Views
Last Modified: 2013-11-11
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
Comment
Question by:walker6o9
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 22719125
does that if condition get met for the listener to trigger?
0
 
LVL 1

Author Comment

by:walker6o9
ID: 22723756
yes
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 2000 total points
ID: 22724726
try this instead.
ldr.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, ldrIoErrorHandler );
0
 
LVL 1

Author Closing Comment

by:walker6o9
ID: 31506180
NAILED IT
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 22728716
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question