ONE THREAD TO RULE THEM ALL!
You may need to read this thread to understand how to work with XML before starting, but I will still explain XML just a little less : AS: XML by Inglor
Ok, so you want to have interactivy and multiplayer online with flash? Well first you need a server! www.nowcentral.com is the one I use.
Install it, then launch it (start > programs > nowserver > launch nowserver)
Now that this is done, to the flash part!
To be able to connect to a server and send/receive XML data you need a socket
mySocket = new XMLSocket();
Then you need to tell the socket what to do when it successfully connects
mySocket.onConnect = function(success){ //success will be true or false
if(success){
//actions when you successfully log
}else{
//actions when you fail to log
}
Then, you need actions to do when the socket loses connection or when you close the connection
mySocket.onClose=function(){
//actions to do
}
Then, you need actions to do when the socket receives data
mySocket.onData = function(data){//data contains what the received XML object contained in a string
data = new XML(data);//converts the string to an XML object (easier to work with)
}
now, you need to connect to a server
mySocket.connect("localhost",5525)//"local
host" is your own IP, else you can enter the IP of the server you want to connect to, 5525 is the port number, it is the default port of nowserver
now, if you want to send XML objects trough that socket
mySocket.send(myXML);
ok that is for everything that has to do with the server, but since this is working with XML objects, you need to learn how to work with them AS: XML by Inglor
just a little something to complete Inglor's tutorial(cause i didnt saw that in his tut), to create an XML object in flash instead of importing one from a file, write your XML in a var.
ex : myXML = '<level id='1' name="Forest of Home>'
myXML = new XML(myXML)
now myXML is an XML object that you can send trough a socket
please post anything to complete this thread, comments and suggestions here
-Steven