2 Replies Latest reply on Apr 22, 2010 3:56 PM by YogiKlatt

    Loading a local XML file in actionscript?



      I've been struggling with a rather simple thing and I cannot find the solution. I want to load a local XML file (which can be found in Flashbuilder4 under "/src") in ActionScript3.


      Here is the code I used for the function:



      var xmlLoader:URLLoader = new URLLoader();


      var xmlData:XML = new XML();


      new URLRequest("yogi.xml")); //




      I also tried to replace "yogi.xml" with the exact file path, but it does not work at all. If I write the XML-manually into the Actionscript code the trace works perfect...but that is of course not the way to go....what am I doing wrong here....?