开发者

How to interact with PHP via getURL in actionscript?

开发者 https://www.devze.com 2022-12-19 17:41 出处:网络
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
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);
}
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号