Flash Client APIs
- initialize
- getInstance
- connect
- disconnect
- joinLobby
- leaveLobby
- subscribeLobby
- unsubscribeLobby
- joinRoom
- joinRoomWithNUser
- joinRoomWithProperties
- leaveRoom
- initUDP
- recoverConnection
- setRecoveryAllowance
public static function initialize(apiKey:String, s2Address:String):void;
Parameters
apiKey - The Application key of the zone its created from the admin dashboard. s2Address - The IP address of the server where the AppWarp S2 zone is hosted.
Returns
void
public static function getInstance():WarpClient
Parameters
Returns
void
public function connect(username:String, authData:String):void;
Parameters
username - Username of the player
authData - custom data for validation by the zone adaptor on the server
Returns
void
public function disconnect():void;
Parameters
Returns
void
public function joinLobby():void;
Parameters
Returns
void
public function leaveLobby():void;
Parameters
Returns
void
public function subscribeLobby():void;
Parameters
Returns
void
public function unsubscribeLobby():void;
Parameters
Returns
void
public function joinRoom(roomId:String):void;
Parameters
roomId - Id of the room to be joined
Returns
void
public function joinRoomWithNUser(userCount:int):void;
Parameters
userCount- number of users in room to be joined
Returns
void
public function joinRoomWithProperties(tableProperties:Object):void;
Parameters
tableProperties- properties of the room to be joined
Returns
void
public function leaveRoom(roomId:String):void;
Parameters
roomId - Id of the room to be left
Returns
void
public function initUDP():void;
Parameters
Returns
void
public static function setrecoveryallowance(time:int):void;
Parameters
time - the time (in seconds) allowed to the client to recover from intermittent connection loss
Returns
void
public function recoverConnection():void;
Parameters
Returns
void
public function createRoom(name:String, owner:String, maxUsers:int, tableProperties:Object):void;
Parameters
name - name of the room owner - administrator of the room maxUsers - number of maximum users allowed in the room tableProperties - properties of room for matchmaking (pass null if not required)
Returns
void
public function createTurnRoom(name:String, owner:String, maxUsers:int, tableProperties:Object, turnTime:int):void;
Parameters
name - name of the room owner - administrator of the room maxUsers - number of maximum users allowed in the room tableProperties - properties of room for matchmaking (pass null if not required) turnTime - the time (seconds) given for each turn
Returns
void
public function deleteRoom(roomId:String):void;
Parameters
roomId - Id of the room to be deleted
Returns
void
public function subscribeRoom(roomId:String):void;
Parameters
roomId - Id of the room to be subscribed
Returns
‘void’
public function unsubscribeRoom(roomId:String):void;
Parameters
roomId - Id of the room to be subscribed
Returns
void
public function sendChat(message:String):void;
Parameters
message - message to be send
Returns
void
public function sendUpdate(update:ByteArray):void;
Parameters
update - binary data to be send
Returns
void
public function sendUdpUpdate(update:ByteArray):void;
Parameters
update - binary data to be send
Returns
void
public function getLiveRoomInfo(roomId:String):void;
Parameters
roomId - Id of the room
Returns
void
public function getLiveUserInfo(username:String):void;
Parameters
username - user who's information is requested
Returns
void
public function getLiveLobbyInfo():void;
Parameters
Returns
void
public function setCustomUserData(userName:String, customData:String):void;
Parameters
userName - user for whom custom data has to be update customData - custom data that will be set for the user
Returns
void
public function SetCustomRoomData(roomId:String, customRoomData:String):void;
Parameters
roomId - Id of the room customRoomData - custom data that will be set for the room
Returns
void
public function updateRoomProperties(roomID:String, tableProperties:Object, removeArray:Array);
Parameters
roomId - Id of the room tableProperties - properties that will be set for the room removeArray - properties that will be removed for the room
Returns
void
public function getOnlineUsers():void;
Parameters
Returns
void
public function getAllRooms():void;
Parameters
Returns
void
public function getRoomWithNUser(userCount:int):void;
Parameters
userCount- number of users in room to be joined
Returns
void
public function getRoomWithProperties(properties:Object):void;
Parameters
properties- properties of the room to be joined
Returns
void
public function setZoneRequestListener(listener:ZoneRequestListener):void;
Parameters
listener - method for listening to the request
Returns
void
public function setRoomRequestListener(listener:RoomRequestListener):void;
Parameters
listener - method for listening to the request
Returns
void
public function setLobbyRequestListener(listener:LobbyRequestListener):void;
Parameters
listener - method for listening to the request
Returns
void
public function setNotificationListener(listener:NotificationListener):void;
Parameters
listener - method for listening to the request
Returns
void
public function addConnectionRequestListener(listener:ConnectionRequestListener):void;
Parameters
listener - method for listening to the request
Returns
void
public function AddUpdateRequestListener(listener:UpdateRequestListener):void;
Parameters
listener - listener object
Returns
void
public function AddChatRequestListener(listener:ChatRequestListener):void;
Parameters
listener - listener object
Returns
void
public function sendMove(moveData:String):void;
Parameters
moveData - data associated with the move to be sent
Returns
void
public function startGame():void;
Parameters
Returns
void
public function stopGame():void;
Parameters
Returns
void
public function getMoveHistory():void;
Parameters
Returns
void