amfPhp
来源:互联网 发布:淘宝闲鱼 编辑:程序博客网 时间:2024/05/16 06:02
调了很久才发现在flex 2中不用设置amf的版本,而且服务器端amfphp是1.2.5或1.9都行得通。如果是amfphp1.9的话,还可以省去methodTable定义。
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:TextArea id="amfphptest" width="200"/>
<mx:Button label="call amfphp" click="callAmfPHP(amfphptest.text)" />
<mx:Script>
<![CDATA[
import flash.net.Responder;
import flash.net.NetConnection;
private var gateway_url:String = "http://www.flashxm.com/amfphp/gateway.php";
private var geteway_conn:NetConnection = new NetConnection();
public function callAmfPHP(str:String):void
{
geteway_conn.connect(gateway_url);
geteway_conn.call("HelloWorld.phpSay", new Responder(onResult, onFault), str);
}
private function onResult(result:Object):void
{
amfphptest.text = result.toString();
}
private function onFault(fault:String):void
{
amfphptest.text = fault;
}
]]>
</mx:Script>
</mx:Application>
其中mx:Script部分简直就等于flash actionscript!
此信息来自〖闪无忧〗
查看原网址:http://www.5uflash.com/Html/flex/10395766.html
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:TextArea id="amfphptest" width="200"/>
<mx:Button label="call amfphp" click="callAmfPHP(amfphptest.text)" />
<mx:Script>
<![CDATA[
import flash.net.Responder;
import flash.net.NetConnection;
private var gateway_url:String = "http://www.flashxm.com/amfphp/gateway.php";
private var geteway_conn:NetConnection = new NetConnection();
public function callAmfPHP(str:String):void
{
geteway_conn.connect(gateway_url);
geteway_conn.call("HelloWorld.phpSay", new Responder(onResult, onFault), str);
}
private function onResult(result:Object):void
{
amfphptest.text = result.toString();
}
private function onFault(fault:String):void
{
amfphptest.text = fault;
}
]]>
</mx:Script>
</mx:Application>
其中mx:Script部分简直就等于flash actionscript!
此信息来自〖闪无忧〗
查看原网址:http://www.5uflash.com/Html/flex/10395766.html
- amfPhp
- AMFPHP
- amfPHP 奇葩
- 关于AMFPHP
- AMFPHP 入门教程。
- amfphp资料
- amfphp资料
- [原创] Flash Remoting + Amfphp
- AS2 的 AMFPHP 教程
- AMFPHP 1.9 教程
- Amfphp相关的介绍
- 运行amfphp范例出错
- AS3访问AMFPHP
- Flex(module)+pureMVC+amfphp
- AMFPHP+FLEX简单应用
- AMFPHP + PHP 5.3.1
- AMFPHP快速入门
- AMFPHP使用常见问题
- Visual Studio 2005 IDE 技巧和窍门
- asp.net常用代码
- Sales Channels of Hong Kong Clothing Industry
- Gmail间歇性不能访问?
- win2000/2003超级技巧
- amfPhp
- mapping--映射文件--详解
- 谈谈字符串常量
- Sleeping with the Enemy
- 通过Google AdSense赚钱最多的8个网站
- 使用 .NET Framework 2.0 在您的应用程序中支持证书
- OSGI典型的应用案例
- 有关windows系统安全的CMD命令大全!
- 有关吴三桂将军最可笑的一篇文章,值得一看