flex로 FMS서버에 접속
My Project/Graduation Project 2008. 6. 26. 17:09 |<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
public function netConnection():void{
var nc:NetConnection = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF0;
nc.connect("rtmp:/HelloWorld");
nc.addEventListener(NetStatusEvent.NET_STATUS, fnstatus);
}
public function fnstatus(e:NetStatusEvent):void
{
trace(e.info.code);
}
]]>
</mx:Script>
<mx:Button label="connect" click="netConnection()" id="connectBtn"/>
<mx:Text x="95" y="105" text="Text" fontSize="27" color="#FDFDFD" id="TestTxt"/>
</mx:Application>
FMS/application/HelloWorld폴더만 만들어주면 된다.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
public function netConnection():void{
var nc:NetConnection = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF0;
nc.connect("rtmp:/HelloWorld");
nc.addEventListener(NetStatusEvent.NET_STATUS, fnstatus);
}
public function fnstatus(e:NetStatusEvent):void
{
trace(e.info.code);
}
]]>
</mx:Script>
<mx:Button label="connect" click="netConnection()" id="connectBtn"/>
<mx:Text x="95" y="105" text="Text" fontSize="27" color="#FDFDFD" id="TestTxt"/>
</mx:Application>
FMS/application/HelloWorld폴더만 만들어주면 된다.