Forum ActionScript 3.0 How to refresh the lobby room and addMessageHandler question

Problems and discussions relating to ActionScript 3.0 here.

How to refresh the lobby room and addMessageHandler question

Postby Turrican » January 15th, 2012, 9:28 pm

1-) If I enter one player and don´t create a room, and enter a second player and after that I create a room, the first player doesn´t see that room. I only see rooms that are created before I enter the lobby (in the example given).

How can I make the players see rooms created after I enter the room?

2-) Can I add a connection.addMessageHandler in the handleConnect function?
I want to add this when the player joins the server, not when the player joins a room.


Thanks!
Turrican
 
Posts: 23
Joined: August 11th, 2011, 11:50 pm

Re: How to refresh the lobby room and addMessageHandler ques

Postby Henrik » January 16th, 2012, 1:04 pm

You don't join a server. You can list rooms on all servers and join rooms on any server.

So to answer your first question: You need to refresh the room list, i.e. call http://playerio.com/documentation/refer ... #listRooms again.

And to answer your second question: No, because you can only send messages to players that are in a room. Before you join a room you have no connection to any multiplayer server whatsoever. You can read a bit more about that here: http://playerio.com/documentation/multi ... essentials
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm


Return to ActionScript 3.0