A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Problem with loading multiple external xml files

Threaded View

  1. #1
    Member
    Join Date
    Jun 2006
    Location
    Croatia
    Posts
    90

    Question Problem with loading multiple external xml files

    I have an array named 'source' which consists of external xml file names whose content i am trying to load into another array called 'content'. I tried with following:

    Code:
    .....
    for (i=0; i<source.length; i++){
       XML_URL = "http://localhost/temp/" + source[i];
       myXMLURL = new URLRequest (XML_URL);    
       myLoader = new URLLoader (myXMLURL);
       myLoader.addEventListener(Event.COMPLETE, xmlLoaded);    
    }    
    ....
    function xmlLoaded(evt:Event):void{
        content.push(myLoader.data);
    }
    The problem is that this way i only get content of the last xml file and other 'content' elements are 'undefined'. Does anyone know solution to this problem or maybe have another way of doing this?

    thanks in advance
    Last edited by blu3; 10-25-2007 at 09:44 AM.

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