2016-10-13 00:16:48 点击量:10 标签: 收藏本文
- <?xml version="1.0" encoding="utf-8"?>
- <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init()">
- <s:layout>
- <s:BasicLayout/>
- </s:layout>
- <fx:Script>
- <![CDATA[
- private var nc:NetConnection;
- private var so:SharedObject;
- private function init():void
- {
- nc = new NetConnection();
- nc.connect("rtmp://cuplayer.com/vod");
- nc.client = this;
- nc.addEventListener(NetStatusEvent.NET_STATUS,onNetStatus);
- }
- private function onNetStatus(evt:NetStatusEvent):void
- {
- trace(evt.info.code);
- if(evt.info.code=="NetConnection.Connect.Success")
- {
- so = SharedObject.getRemote("myMsg",nc.uri,false);
- so.addEventListener(SyncEvent.SYNC,onSYNC);
- so.connect(nc);
- }
- }
- private function onSYNC(evt:SyncEvent):void
- {
- for(var i:uint=0;i<evt.changeList.length;i++)
- {
- switch(evt.changeList[i].code)
- {
- case "change":
- updateList();
- break;
- case "clear":
- break;
- case "success":
- break;
- default:
- break;
- }
- }
- }
- private function updateList():void
- {
- msgList.text += so.data.msg+"\n";
- }
- protected function onClick(event:MouseEvent):void
- {
- so.setProperty("msg",txtInput.text);
- msgList.text+=txtInput.text+"\n";
- txtInput.text="";
- }
- public function onBWDone():void{}
- ]]>
- </fx:Script>
- <fx:Declarations>
- <!-- 将非可视元素(例如服务、值对象)放在此处 -->
- </fx:Declarations>
- <s:TextArea id="msgList" x="173" y="37" width="300" height="150"/>
- <s:TextInput id="txtInput" x="173" y="218" width="209"/>
- <s:Button id="btnPost" x="399" y="219" label="按钮" click="onClick(event)" />
- </s:Application>
我们是一家提供综合软件外包与弱电工程服务的技术公司。
业务涵盖定制软件、管理系统、网站、小程序、APP、系统集成、网络布线、监控安防、门禁、机房建设及长期技术维护。
公司地址:湖北省宜昌市伍家岗区东站二路6号三峡(宜昌)大数据产业园海洋馆二楼A203室