ActionScript.org Flash, Flex and ActionScript Resources - http://www.actionscript.org/resources
XML Socket in as3 :)
http://www.actionscript.org/resources/articles/604/1/XML-Socket-in-as3-/Page1.html
Franky Natividad
I started programming at age 14. My first was ActionScript Ever since then Ive always wanted to make an Online game. Now with that successful, Now I wish to help others with their problems, and provide out of the box Flash Projects that may inspire others to do greater things.  
By Franky Natividad
Published on May 6, 2007
 
Hey im proud to announce XMLSockets in as3 its a bit different from as2 and a lot more confusing but Ill show you what to do to do it :)

AS3 XML Sockets
I started to research the script library for as3 on flash 9 and figured out how to do xml its alot harder this time around :( sorry to say but I got all the functions onConnect(TRUE OR FALSE) and onDisconnect() and yes they do work :)

Alright after 30 mins of testing I got it working and got all the listeners and event handlers ready to go for you all first Listeners and initiate :)
[as]
var xml_s=new XMLSocket();
xml_s.connect(ip,port);
xml_s.addEventListener(Event.CONNECT,xmlsocket);//OnConnect//
xml_s.addEventListener(Event.CLOSE,xm lsocket);//OnDisconnect//
xml_s.addEventListener(IOErrorEvent.I O_ERROR,xmlsocket);//Unable To Connect//[/as]

Now for listener handlers :)
[as]
public function xmlsocket(Event):void{
switch(Event.type){
case 'ioError':
//Unable to Connect :(//
break;
case 'connect':
//Connected :)//
break;
case 'close':
//OnDisconnect :( //
break;
}
}[/as]
Now to Send all you do is this.[as]
xml_s.send("MESSAGE HERE");[/as]


I hope i helped you enough remember If you have any questions ask me I doubt they have anything on this yet :)