XML Socket in as3 :)

AS3 XML Sockets
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.
View all articles by Franky NatividadAlright 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.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//
Now for listener handlers :)
public function xmlsocket(Event):void{
switch(Event.type){
case 'ioError':
//Unable to Connect :(//
break;
case 'connect':
//Connected :)//
break;
case 'close':
//OnDisconnect :( //
break;
}
}
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 :)
Spread The Word
5 Responses to "XML Socket in as3 :)" 
|
said this on 02 Jul 2007 3:52:13 PM CST
i just want to ask you if
t |
|
said this on 11 Jul 2009 3:32:40 AM CST
how is the AS3 equivalent
|
|
said this on 17 Jul 2009 6:39:00 AM CST
The AS3 equivalent of the
|
|
said this on 02 Nov 2009 8:03:01 AM CST
Hello!
I have a question |


Author/Admin)