Game Development Reference
In-Depth Information
In response to a join request, the server notifies the requesting client of whether the
action was successful or failed via the game client callback method.
function onJoinedGameRoom(gameRoomId:int, error:int):void
A player already in a game room may leave the room and go back to the lobby,
by calling the following API:
public function leaveGameRoom():void
Note that if the player successfully left the room, the calling game client will receive
the notification via the following callback API:
function onLeaveGameRoom(error:int):void
New game screen implementation
NewGameScreen is where a new game room is created when the player clicks on
the new game room button in the lobby screen.
New game screen in Hello World
The lobby screen gets replaced by the NewGameScreen or that of the subclass we
have set up. In all cases, you must subclass the NewGameScreen and override at least
the createNewGameRoom method. This method is called when the player finally clicks
on OK .
The following is the overridden method from the Hello World sample:
protected override function createNewGameRoom():void {
// Create the new Game room object
 
Search WWH ::




Custom Search