i’ve been having a hard time getting flash to read the output of a php script. the php seems to output name/value pairs ok when accessed in the browser but flash is getting the variables as ‘undefined’ when i try to trace them.
just to test my setup i followed the simple example here - http://www.heaveninteractive.com/weblog/2008/03/17/using-actionscript-30-with-php-part-1/ - but it still gives undefined.
if i trace evt.target.data i get
%3C%3Fphp%0A%0A%24returnVars%20=%20array%28%29%3B%0A%24returnVars%5B%27username%27%5D%20%3D%20%22John%20Doe%22%3B%0A%24returnVars%5B%27email%27%5D%20%3D%20%22johndoe%40hotmail%2Ecom%22%3B%0A%24returnString%20%3D%20http%5Fbuild%5Fquery%28%24returnVars%29%3B%0A%0A%2F%2Fsend%20variables%20back%20to%20Flash%0Aecho%20%24returnString%3B%0A%0A%3F%3E
email is undefined
so i can see the values in there, i think it might have something to do with the whitespace % symbols confusing flash.
as you can tell im not the most experienced as3 bod. any ideas my fellow scripters?