2 Replies Latest reply on Feb 19, 2007 7:01 AM by newman_

    URLVariables.decode() - where is problem...?

    newman_
      Hi!
      I have code like this:
      private function sendData(id:String, sd:String):void {

      var req:URLRequest=new URLRequest("../php/save-data.php");
      req.method = URLRequestMethod.POST;
      var vars:URLVariables = new URLVariables;
      //
      vars.serviceid = id;
      vars.standarddata = sd;
      //
      req.data = vars;
      //
      var ldr:URLLoader = new URLLoader();
      ldr.load(req);
      ldr.addEventListener(Event.COMPLETE,onVarsLoaded);
      }
      private function onVarsLoaded(event:Event):void{
      var retVars:URLVariables = new URLVariables(event.target.data);
      txt.htmlText = "done!";
      //var loadedStat:String = retVars.response;
      }

      ..and I've got error: String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
      Where is problem???