as3-client-event

*We assure you that we do not spam. You may receive occasional emails from us.
 You can always unsubscribe.
Flash

Flash Client Events

All Rooms Event

This event is raised in response to the getAllRooms request. It is passed in the registered ZoneRequestListener’s onGetAllRoomsDone request. It exposes the following properties

  • result:int – Result status of the request.
  • list:Array – room id array of all the rooms.
public class LiveResult
{
	public var result:int;
	public var list:Array;
}
All Users Event

This event is raised in response to the getOnlineUsers request. It is passed in the registered ZoneRequestListener’s onGetOnlineUsersDone method. It exposes the following properties

  • result:int – Result status of the request.
  • list:Array – array of usernames for all the online users.
public class LiveResult
{
	public var result:int;
	public var list:Array;
}

Represents an array of usernames for all the online users if the request is successful.

Chat Event

This event is raised when a chat notification is received from a subscribed location such as room or lobby. It is passed in registered NotifyListener’s onChatReceived method. It exposes the following properties

  • chat:String – The string message sent by the sender.
  • sender:String – The sender of the message.
  • locid:int – The id of the location in which the message was sent (eg: room id)
  • isLocationLobby:Boolean – Is the location a room or lobby.
public class Chat
{
	public var chat:String;
	public var sender:String;
	public var locid:int;
	public var isLocationLobby:Boolean;
	public var result:int;
}
Connect Event

This event is raised in response to a connect request. It is passed in the registered ConnectionRequestListener’s onConnectDone method. It exposes the following properties

  • result:int – Result status of the request.
result:int;
Live Room Info Event

This event is raised in response to the getLiveRoomInfo or getLiveLobbyInfo request. It is passed in the registered RoomRequestListener’s onGetLiveRoomInfoDone method and in the LobbyRequestListener’s onGetLiveLobbyInfoDone method. It exposes the following properties

  • users:Array – Array of usernames who are joined in the room
  • customData:String – Custom data associated with the room
  • properties:Object – Properties associated with the room (empty for lobby).
  • room:Room – The static information structure of the room (or lobby).
  • result:int – Result status of the request.
public class LiveRoom
{
	public var room:Room;
	public var customData:String;
	public var users:Array;
	public var properties:Object;
	public var result:int;
}
Move Event

This event is raised when a move completed notification arrives from the server. It is passed in the registered NotifyListener’s onMoveCompleted method and an array of this is passed in the TurnBasedRoomListener’s onGetMoveHistoryDone method. It exposes the following properties

  • sender:String – The username of the sender of the move
  • moveData:String – The data passed by the sender in the move
  • nextTurn:String – The username of the player whose turn its next
  • roomId:String – The id of the concerned turn based room
public class Move
{
        public var sender:String;
        public var moveData:String;
        public var nextTurn:String;
        public var roomId:String;
}
Live User Info Event

This event is raised in response to the getLiveUserInfo request. It is passed in the registered ZoneRequestListener’s onGetLiverUserInfo request method. It exposes the following properties

  • result:int – Result status of the request.
  • locationID:String – The id of the location in which the user is present.
  • name:String – The username of the user
  • customData:String – The custom data associated with the user
public class LiveUser
{
	public var name:String;
	public var locationID:String;
	public var customData:String;
	public var result:int;
}
Lobby Event

This event is raised in response to requests for join/leave/subscribe/unsubscribe lobby. It is passed in the corresponding methods of the registered LobbyRequestListener. It exposes the following properties.

  • lobbyid:String – The id of the lobby. This is always 0 and is reserved for future if multi-lobby support is added.
  • owner:String – The owner of the lobby.
  • maxUsers:int – The max concurrent users allowed in the lobby.
  • name:String – The name of the lobby.
  • isPrimary:Boolean – Is the lobby the primary one. This is always true and is reserved for future if multi-lobby support is added.
  • result:int – Result status of the request.
public class Lobby
{
	public var lobbyid:String;
	public var owner:String;
	public var maxUsers:int;
	public var name:String;
	public var isPrimary:Boolean;
	public var result:int;
} 
Room Event

This event is raised in response to requests for join/leave/subscribe/unsubscribe room. It is passed in the corresponding methods of the registered RoomRequestListener. It exposes the following properties.

  • roomId:String – Unique id of a room. It is unique across all the rooms.
  • owner:String – owner of the room (behavior and usage of this meta property is up to the developer)
  • maxUsers:int – number of maximum users allowed in the room
  • name:String – name of the room
  • result:int – Result status of the request.
public class Room
{
	public var roomId:String;
	public var owner:String;
	public var maxUsers:int;
	public var name:String;
	public var result:int;
}
Update Event

This event is raised when a updatePeers notification is received from a subscribed location such as room or lobby. It is passed in registered NotifyListener’s onUpdatePeersReceived method. It exposes the following properties

  • update:ByteArray – The byte array sent in the room.
update:ByteArray;
Matched Room Event

This event is raised in response to requests for matchmaking request(getRoomwithNUsers/getRoomWithProperties). It is passed in the corresponding methods of the registered ZoneRequestListener. It exposes the following properties.

  • result:int – Result status of the request.
  • rooms:Array – Array RoomData objects representing each of the matched rooms.
public class MatchedRooms
{
	public var result:int;
	public var rooms:Array;
}