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:
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?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); }
thanks in advance




Reply With Quote