1 Reply Latest reply on Mar 5, 2007 3:02 PM by matt4444

    Why does loadvars stop working when I give it the domain?

    matt4444
      Maybe you can figure this one out.

      When I specify the full url for load vars including the domain it stops working when I put the SWF on the server. However if I load the SWF locally it does load the page from the remote server. I find that I have to take the server domain out of the argument in order to make it work on the server, like so:


      var sendVars = new LoadVars();

      var result:LoadVars = new LoadVars();
      result.onLoad = function(success:Boolean)
      {
      _root.dataStr=success+" "+result;
      }

      // this works when I load the SWF on my local computer but not when I put it on my web server:
      sendVars.sendAndLoad(" http://myserver.com/myFile", result, "POST");

      // works when I put it on the web server but not when the SWF is local (of course):
      sendVars.sendAndLoad("myFile", result, "POST");


      Any idea what I'm doing wrong?