Solved

IOErrorEvent not working

Posted on 2008-10-14
5
311 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Embedded Video Download (Flash) 3 1,198
Video sharing with user login 3 221
private function works only without TabNavigator? 3 343
Google Chrome Blank White Screens 13 311
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…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

752 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