How to interact with PHP via getURL in actionscript?
getURL('http://www.google.com',_blank);
The above can open google.com,but how to fetch data from server side(PHP) on 开发者_开发百科localhost?
I found this tutorial
<?
$first="this";
$second = "that";
echo "myfirst=$first&mysecond=$second";
exit;
?>
Flash Actionscript:
var lvSend = new LoadVars();
var lvReceive = new LoadVars();
lvSend.SendAndLoad("www.domain.com/script.php",lvReceive,"POST");
lvReceive.onLoad = function(bSuccess) {
if(bSuccess == true) {
trace(this.myfirst);
trace(this.mysecond);
}
}
精彩评论