用户登录


分享到新浪微博

只有坚强的人才会有动人的脆弱
If a thing is worth doing it is worth doing well
Pain past is pleasure
——我的微博 http://t.sina.com.cn/impossibleisnothing

回复评论

ActionScript 3中与后台通讯

1.前台flash<<<<后台php,flash并没有抛出数据,只是抛出读取指令

//////////////////actionscript code//////////////////////////////////////////
//声明一个URLLoader
var loader:URLLoader = new URLLoader();
//监听数载加载完成事件
loader.addEventListener(Event.COMPLETE,loaded);
//事件相应函数
function loaded(e:Event)...{
    trace(loader.data);
// output : this data is from php!
    }
//加载test.php
    loader.load(new URLRequest("test.php"));
// ////////////////test.php code/////////////////////////////////
<?php
//声明一个变量并赋给一个字符串
$data ='this data is form php!';
//输出这个变量给flash
echo $data;
?>

—————————————————————————–
2.前台flash<<>>后台php,flash以post方式抛数据给php,php以字符串数据返回flash

//actionscript code
var loader:URLLoader = new URLLoader();
//声明一个URLRequest
var url:URLRequest = new URLRequest("test.php");
//设置传输方式为POST
url.method = URLRequestMethod.POST;
//声明一个URLVariables
var values:URLVariables = new URLVariables();
//设置要传输的信息
values.message="hello im flash!";
    url.data = values;
loader.addEventListener(Event.COMPLETE,loaded);
function loaded(e:Event)...{
trace(loader.data);
// output : this is flash say:hello im flash!
   }
loader.load(url);
// ////////////////test.php code/////////////////////////////////
<?php
//test.php code//
<?php
$flashData = $_POST['message'];
echo "this is flash say:$flashData";
?>

回复

  • 自动将网址与电子邮件地址转变为链接。
  • 允许HTML标签:<a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <param> <strike> <caption>

更多关於格式化选项的信息

新进用户

  • x64
  • zheyuan.huang
  • adax.huang
  • admin

在线用户

目前共有 0 个用户2 位游客 在线。

大漠邪阳

QQ:20867228

MSN:jy_hcq@sina.com

微博:t.sina.com.cn/impossibleisnothing

文章统计