I was searching on google for it, I couldn't find it.
I would like to know how can I listen to sockets using actionscript 3
views:
80answers:
2
+1
A:
You can't do this directly in Flash. You can however do it through an AIR application starting in AIR 2.0. You can download the AIR 2.0 Beta here: http://labs.adobe.com/downloads/air2.html
I know that's not exactly the answer you were hoping for, but I hope it helps.
EDIT: As an extra note, I've done it in AIR 2, and it is pretty is easy to get up and running.
Tyler Egeto
2010-01-26 22:36:09
So How do people makes online games without receiving information from the server? o_o
M28
2010-01-26 22:42:01
Well typically, you would make a socket connect from Flash, not receive one. So you might have a Java based SocketServer running to handle the communication. You might want to explore the new peer-to-peer stuff in Player 10
Tyler Egeto
2010-01-26 22:44:41
Also note, if you wanted to create an AIR SocketServer, you can run it on a server that your Flash applications could connect to, basically exactly the same as you would with a JAVA solution.
Tyler Egeto
2010-01-26 22:46:42
I am talking about the nonoba api or others apis, how do the client receive information about the server?
M28
2010-01-26 22:52:44
Nonoba has a serverside application you communicate through. They are using one built on #C as appose to JAVA, but same idea.
Tyler Egeto
2010-01-26 22:55:45
I mean, How do the CLIENT receive information?
M28
2010-01-26 22:59:10
In Flash you create socket and connect to the server side application. Once that connection is made, you can send/receive information. But you can not receive connections, only create, and rely on the server app to shuttle information between users.
Tyler Egeto
2010-01-26 23:06:10
Oh, I understand, I need a java server to forward the information to the main server?
M28
2010-01-26 23:39:14
No sorry, I'll try to be clearer. Basically you would have an application running (JAVA or similar). Your flash applications would connect to it. All data would go to this application, and it would share that data with any other players connected. The JAVA application IS the server.
Tyler Egeto
2010-01-26 23:44:56
What about this:The java collect the information about the clients, then it sends it to the flash server.
M28
2010-01-27 01:26:34
I'll make the server using AIR, thank you so much :)
M28
2010-01-27 02:04:13
Ya, that great solution, lets you stay entirely in AS
Tyler Egeto
2010-01-27 02:31:37
I gonna need to update my flash T_T, anyway, thanks a lot.
M28
2010-01-27 02:37:13