<?xml version=
<mx:Application xmlns:mx=
fontSize=
<mx:Script>
<![CDATA[
import ntrols
import
import flash
import flash
//import flash
private var socket:Socket=new Socket();
internal function readConf():void
{
// var host:String = client_para
}
internal function initApp():void
{
// Security
/// Alert(host);
//var port:int = client_para
//Alert(port);
myInput
nnect(
socket
socket
socket
}
internal function funConnect(event:Event):void
{
myText
}
internal function funClose(event:Event):void
{
myText
}
internal function sendMessage(msg:String):void
{
var message:ByteArray=new ByteArray();
message
socket
socket
myInput
}
internal function funSocket(event:ProgressEvent):void
{
var msg:String=
while(socket
{
msg+=socket
var arr:Array=msg
for(var i:int=
{
if(arr[i]
{
var myPattern:RegExp=/\r/;
arr[i]=arr[i]
myText
}
}
myText
}
}
private function sendMessageUseEnterKey(evt:KeyboardEvent):void{
if(evt
sendMessage(myName
}
}
]]>
</mx:Script>
<!
<mx:Panel width=
<mx:TextArea y=
<mx:TextInput x=
<mx:Button label=
<mx:TextInput width=
</mx:Panel>
</mx:Application>
From:http://tw.wingwit.com/Article/program/Java/hx/201311/27122.html