Skip to main content
oluc
Known Participant
January 9, 2010
Answered

Error #2044 Unhandled IO ErrorEvent

  • January 9, 2010
  • 1 reply
  • 1041 views

Hello. I have am getting the error:

Error #2044: Unhandled IOErorEvent:. textError #2035: URL Not Found.

option images/1a.jpg

I can't for the life of me figure out why I am getting this error because in the same programming I have the same picture loaded in a different place and it comes up fine. And I don't know what it means by "option".

Here is the code the error is comming from:

rawImage = xd.subject[subNum].imgURL;

imageHolder = new MovieClip;

imageLoader = new Loader;

imageLoader.load(new URLRequest(rawImage));

imageHolder.addChild(imageLoader);

imageHolder.x = 128;

imageHolder.y = 165;

addChild(imageHolder);

As I said earlier, I have the same picture loading later in the programming. But I am loading it differently because in this case it loads when a button is clicked. In the code I typed above I was using it to load the picture withough any button click.

I am using XML for all of the pictures.

Do you see something wrong? Or do you have any ideas on what I could check to further investigate the situation?

Thanks for any help you have to offer!

This topic has been closed for replies.
Correct answer kglad

xml..imgURL[0] will be images/1a.jpg if your XML instance is xml.

1 reply

kglad
Community Expert
Community Expert
January 9, 2010

use the trace() function to track your error:


rawImage = xd.subject[subNum].imgURL;

imageHolder = new MovieClip;

imageLoader = new Loader;

imageLoader.load(new URLRequest(rawImage));

trace(rawImage)

imageHolder.addChild(imageLoader);

imageHolder.x = 128;

imageHolder.y = 165;

addChild(imageHolder);


oluc
olucAuthor
Known Participant
January 9, 2010

Tks.

This is what it says in the output panel:

<imgURL>images/1a.jpg</imgURL>

<imgURL>images/1b.jpg</imgURL>

<imgURL>images/1c.jpg</imgURL>

<imgURL>images/1d.jpg</imgURL>

Error #2044: Unhandled IOErrorEvent:. text=Error #2035L URL Not Found.

I have no other traces going at this time.

So it seems that maybe my problem is that I have all images 1a, 1b, 1c, 1d under the same parent (or however it is called) in the xml. So under the code for rawImage how do I refer to just the first child of the "subject" in the xml?

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
January 9, 2010

xml..imgURL[0] will be images/1a.jpg if your XML instance is xml.