1 Reply Latest reply on Jun 7, 2007 9:02 AM by peterent

    Absolute XML File path

    Encom79
      Hi want to read datas from an XML file stored on server at runtime.

      I declare the following line :
      <mx:HTTPService id="dataService" url="projects.xml" resultFormat="e4x"/>
      <mx:XMLListCollection id="pdata" source="{dataService.lastResult.project}"/>

      and this one :
      private function init():void { dataService.send(); }

      I compile, it works fine, but when I copy the swf and projects.xml in an another dir, it crashed : cannot found c:\flex\proj\projects.xml !!!!!!
      It doens not know the .\projects.xml.

      How to specify it to read the file from "." ?

      thanks
        • 1. Re: Absolute XML File path
          peterent Level 2
          Did you run your application from Flex Builder while you were making it? Flex Builder gives the SWF a special security designation.

          You should copy your files to a web server and then use the browser to display your Flex SWF. The browser will load the SWF and note the domain then it will request the server to send it your xml file.