tabatsoy
May 10th, 2009, 11:53 PM
Greetings Earthlings!!!
I'm getting and error: Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
Here is my code:
var image_loader:Loader;
var xml:XML;
var xml_list:XMLList;
var xml_loader:URLLoader = new URLLoader();
xml_loader.load(new URLRequest("images.xml"));
xml_loader.addEventListener(Event.COMPLETE, xml_loaded);
function xml_loaded(event:Event):void {
xml = XML(event.target.data);
xml_list = xml.children();
trace(xml);
image_loader = new Loader();
image_loader.load(new URLRequest(xml_list.attribute("source")));
addChild(image_loader);
}
and here is my folder structure: New Folder \ [images(folder)] [images.xml] [untitled1.fla] [untitled1.swf] \ [image1.jpg] [image2.jpg] [image3.jpg] [image4.jpg] [image5.jpg]
and here is my xml :
<?xml version="1.0" encoding="utf-8"?>
<images>
<image source="images/image1.jpg">image 1</image>
<image source="images/image2.jpg">image 2</image>
<image source="images/image3.jpg">image 3</image>
<image source="images/image4.jpg">image 4</image>
<image source="images/image5.jpg">image 5</image>
</images>
thanks and I hope to hear from you soon
:yoda:
I'm getting and error: Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
Here is my code:
var image_loader:Loader;
var xml:XML;
var xml_list:XMLList;
var xml_loader:URLLoader = new URLLoader();
xml_loader.load(new URLRequest("images.xml"));
xml_loader.addEventListener(Event.COMPLETE, xml_loaded);
function xml_loaded(event:Event):void {
xml = XML(event.target.data);
xml_list = xml.children();
trace(xml);
image_loader = new Loader();
image_loader.load(new URLRequest(xml_list.attribute("source")));
addChild(image_loader);
}
and here is my folder structure: New Folder \ [images(folder)] [images.xml] [untitled1.fla] [untitled1.swf] \ [image1.jpg] [image2.jpg] [image3.jpg] [image4.jpg] [image5.jpg]
and here is my xml :
<?xml version="1.0" encoding="utf-8"?>
<images>
<image source="images/image1.jpg">image 1</image>
<image source="images/image2.jpg">image 2</image>
<image source="images/image3.jpg">image 3</image>
<image source="images/image4.jpg">image 4</image>
<image source="images/image5.jpg">image 5</image>
</images>
thanks and I hope to hear from you soon
:yoda: