2 Replies Latest reply on Oct 1, 2007 3:02 PM by sean1000

    Relative paths in .actionScriptProperties

    sean1000 Level 1
      Does anyone know how to make relative paths in .actionScriptProperties (either from within FB or by editing the file directly)? I can only seem to get FB to use absolute paths, which is a hassle when sharing this file with team members.
        • 1. Relative paths in .actionScriptProperties
          aceinc Level 1
          I too would like to know whether this is possible.

          When I started working with flex I created a public variable that I use with my HTTPService to simulate relative paths, here is the code;

          in my .as file I have
          [Bindable] public var RootDomain:String;

          private function initApp():void
          if (this.url.substr(0,7) == "file://")
          RootDomain = ""
          RootDomain = this.url.substr(0,this.url.indexOf("/",this.url.indexOf("//")+2)+1);

          in the .mxml file I have;
          <mx:HTTPService id="moduleLoad"
          url="{ RootDomain + 'aspvb.net/LogEntry.aspx' }"
          useProxy="false" showBusyCursor="true" method="GET"

          What I needed was to have the code look at the current server for the ASP.NET stuff unless I was running from the IDE (file://) in which case I want it to use the test server

          Not particularly elegant, but it does what I need.


          • 2. Re: Relative paths in .actionScriptProperties
            sean1000 Level 1
            Thanks for the response Paul.
            You may want to check
            for your particular problem?

            My problem is more basic. I want to use relative paths (e.g. ../lib) for the source paths for some of the libs I use (e.g. Cairgnorm, FlexUnit etc.) but the IDE always makes the path entered not relative, which is a problem when sharing these files with the team, as then everyone has to agree on the exact path to use.