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 :)
var xml_s=new XMLSocket();
xml_s.addEventListener(Event.CLOSE,xm lsocket);//OnDisconnect//
xml_s.addEventListener(IOErrorEvent.I O_ERROR,xmlsocket);//Unable To Connect//

Now for listener handlers :)
public function xmlsocket(Event):void{
case 'ioError':
//Unable to Connect :(//
case 'connect':
//Connected :)//
case 'close':
//OnDisconnect :( //

Now to Send all you do is this.
xml_s.send("MESSAGE HERE");

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