title: AS3: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs
body: <p>I'm freaking out. Searched the web for an hour, nothing helped. I'm trying to load PHP data to flash, but it doesn't work. Here's the as3 code:</p>
  
  <pre><code>var adressS:URLRequest = new   URLRequest("adress/file.php");
  
  var scriptLoader:URLLoader = new URLLoader();
  
          adressS.method = URLRequestMethod.POST;
  
          scriptLoader.dataFormat = URLLoaderDataFormat.VARIABLES; 
          scriptLoader.load(adressS);
  
          scriptLoader.addEventListener(Event.COMPLETE, handleLoadSuccessful);
          scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);
  
          function handleLoadSuccessful(e:Event):void {
              if(scriptLoader.data.resulte == "wrong") {
                  error_mc.visible = true;
                      error_mc.gotoAndStop(1);
              } else { ... }
  </code></pre>
  
  <p>And here's PHP:</p>
  
  <pre><code>&lt;?php
      if(!isset($_SESSION['login'])) {
      echo 'resulte='.'wrong';
  }
  ?&gt;
  </code></pre>
  
  <p>I get </p>
  
  <blockquote>
    <p>resulte=wrong</p>
  </blockquote>
  
  <p>from php, so i guess it's not the problem, but when i try to run flash file, i get output error:</p>
  
  <blockquote>
    <p>Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
        at Error$/throwError()
        at flash.net::URLVariables/decode()
        at flash.net::URLVariables$iinit()
        at flash.net::URLLoader/flash.net:URLLoader::onComplete()</p>
  </blockquote>
  
  <p>I have no idea what am i doing wrong.</p>
  
  <p>Please, help.</p>