开发者

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);
}
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜