Solved

IOErrorEvent not working

Posted on 2008-10-14
5
301 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 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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 found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

705 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now