【flash player】flash fms3.5 asc文件没反应

更新时间:2015-12-31    来源:组件控件开发    手机版     字体:

【www.bbyears.com--组件控件开发】

main.asc:


1. application.onAppStart=function()
2. {
3. trace("fms服务器启动......");
4. };
5.

6.


7. application.onConnect=function(client)
8.  {
9.   this.acceptConnection(client);    
10.   client.sayH=function(str){
11.          return "I can say:Hello "+ str;
12.      };
13.       
14.  };

复制代码

客户端相关代码:

1. private var nc:NetConnection;
2. private var rtmpUrl:String="rtmp://localhost/test";
3. private var rsp:Responder;
4. private var ns:NetStream;
5. private function onConn():void{
6. nc=new NetConnection();
7. nc.connect(rtmpUrl);
8. nc.client=this;
9. rsp=new Responder(onSuc,onFail);
10. nc.call("sayH",rsp,"World");
11. nc.addEventListener(NetStatusEvent.NET_STATUS,conS);
12. nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR,conF);

本文来源:http://www.bbyears.com/asp/20634.html

猜你感兴趣