Hi there, I was wondering if anyone knew why I was getting this error.
[COLOR=red]Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.[/COLOR]
I’m trying to load an XML file with its imageURLs into my fla I double and triple checked the URLs to make sure they were correct but for some reason the element my e.target.name is pointing to is not correctand I don’t know how to trace things like that. Here I’ll show you what I’m currently working with.
my XML is loaded with lines like this.
[COLOR=seagreen]<IMAGE FULL=“images/image2.png” THUMB=“thumbnails/thumbnail2.png” />[/COLOR]
[COLOR=black]I process my XML and that works fine[/COLOR]
function processXML(e:Event):void {
var myXML:XML = new XML(e.target.data);
columns = myXML.@COLUMNS;
my_x = myXML.@XPOSITION;
my_y = myXML.@YPOSITION;
my_thumb_width = myXML.@WIDTH;
my_thumb_height = myXML.@HEIGHT;
my_images = myXML.IMAGE;
}
calling my thumbnails works fine also
function callThumbs():void {
for (var i:Number = 0; i < my_total; i++) {
var thumb_url = my_images*.@THUMB;
var thumb_loader = new Loader();
thumb_loader.load(new URLRequest(thumb_url));
thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
thumb_loader.x = (my_thumb_width+10)*i;
}
}
there is a mouselistener attached to the maincontainer these thumbs are being loaded into so whenever a click is made the thumb is supposed to load the larger image see function below.
function callFull(e:MouseEvent):void {
var full_url = my_images[e.target.name].@FULL; // this line is giving me issues.
var full_loader:Loader = new Loader();
full_loader.load(new URLRequest(full_url));
full_loader.contentLoaderInfo.addEventListener(Event.INIT, fullLoaded);
container_mc.removeEventListener(MouseEvent.CLICK, callFull);// remove the thumbnail event listeners for now
}
as you can see I commented the line that is giving me issues. I’m not sure how to trace the element to see how its even supposed to look. e.target.name returns instance# but I don’t know why its giving an error, I’m rather new to XMLlists and such.
but my_images is the IMAGE line, e.target.name is the mousetarget that was clicked on @FULL is the full url of the image. why its giving the wrong info is beyond me. Please help if possible. thank you.
btw my folders are setup right, images/image#.png, thumbnails/thumbnail#.png xml/fla/swf are all in the root folder.
Thanks for reading.