Developing with Flash CS3 and PHP happen to receive the following error:
The String passed to URLVariables.decode () must be a URL-encoded query strings containing
name / value pairs.
Usually it is a mistake due to a broken echo PHP on Flash.
Working with PHP and Flash is not like working with PHP and HTML.
Flash needs a specific echo well.
So to solve this problem, echo PHP should be the following:
<?php
$answer='ok';
echo "answer=".$answer;
?>
and Flash is obtained in this way:
private function echoFromPHP(evt:Event):void
{
var caller:URLLoader=URLLoader(evt.target);
var vars:URLVariables=new URLVariables(caller.data);
trace(vars.answer);
}







