0 Replies Latest reply on Jun 28, 2007 10:13 PM by oneofhero

    try to load a xml file to a web site


      I try to load request.xml to a web site. But i can't not get it working. What is wrong?

      var fileRequest:URLRequest = new URLRequest("Request.xml");
      var str:String = "";
      var fileLoader:URLLoader = new URLLoader();

      var myXML:XML = new XML();
      var XML_URL:String = "www.something.com/po";
      var myXMLURL:URLRequest = new URLRequest(XML_URL);
      var myLoader:URLLoader = new URLLoader(myXMLURL);

      fileLoader.addEventListener("complete", fileLoaded);
      myLoader.addEventListener("complete", xmlLoaded);

      function fileLoaded(event:Event):void
      //add xml data in the myXMLURL
      myXMLURL.contentType ="XML";
      myXMLURL.data = XML(fileLoader.data);
      myXMLURL.method = URLRequestMethod.POST;

      function xmlLoaded(event:Event):void