A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: XML gallery not working

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    1

    XML gallery not working

    Hi there,

    I'm trying to set up a simple XML gallery but I get the following error when testing the gallery:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.

    AS=
    var xmlRequest:URLRequest = new URLRequest("imageData.xml");
    var xmlLoader:URLLoader = new URLLoader(xmlRequest);
    var imgData:XML;
    var imageLoader:Loader;
    var rawImage:String;

    var imgNum:Number = 0;

    xmlLoader.addEventListener(Event.COMPLETE, xmlLoadedF);

    function xmlLoadedF(event:Event):void{
    imgData = new XML(event.target.data);
    trace(imgData);
    rawImage = imgData.image[imgNum].imgURL;
    imageLoader = new Loader;
    imageLoader.load(new URLRequest(rawImage));
    master_mc.addChild(imageLoader);
    }

    The trace shows that the XML file is picked up and all is in the same folder.
    Don't know what I'm doing wrong? What URL can't be found?

    Any help would be appreciated!
    Thanks

  2. #2
    ViresExDecus dewman's Avatar
    Join Date
    Nov 2001
    Posts
    389
    could you post the xml file?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center