2006/04/12 | Flash和php通讯(2)-LoadVars
类别(Flash&AS2) | 评论(1) | 阅读(506) | 发表于 19:06
这个是个完整的Flash->PHP->Flash的数据流过程
Flash里写在第一桢:
var sendLoad:LoadVars = new LoadVars();
var acceptLoad:LoadVars = new LoadVars();
sendLoad.userName = "Billows";
sendLoad.passWord = "888888";
sendLoad.sendAndLoad("accept.php", acceptLoad, "POST");
acceptLoad.onLoad = function(){
  var myText = _root.createTextField("Billows", 0, 100, 100, 100, 100);
  myText.text = this.data;
}
PHP里:
<?
$ userName = $ _POST['userName'];
$ passWord = $ _POST['passWord'];
echo "&data=".urlencode($ data)."&";
?>
今天才知道php里连接字符串居然用.
哈哈,真没想到!
0

评论Comments

日志分类
首页[116]
Flash&AS2[56]
FMS[3]
Flex&AS3[5]
Asp[5]
My Works[13]
My Life[34]