package de.maxmaurer.FlashGameCommunicator.Events { import flash.events.Event; /** * FlashGameCommunicator - GameEvent *
This class contains the Event fired every time an Eventchange happens within the * FlashGameCommunicator.
*Each event carries a different number of parameters which are listed below, which of * these parameters contain values depends on the Event-Type as well as the messageType
*An event listener can be bound to six different types of Events that may happen:
*CONNECTED The connected-event is fired when the connection to the
* FlashGameCommunicator-Server has been established.DISCONNECTED The disconnected-event is fired when the connection
* to the server is ended or when the connection is lost by unknown reasonMESSAGE Message events are the only events that happend without
* a prior call to the FlashGameCommunicator-API. Every time a message intended for
* this client is sent by the server the Message-Event fires. The type of the message
* (BROADCAST, ROOM, PERSONAL or LOBBY) is stored in the messageType-field.SUCCESS Success event describe a successfull execution of the
* last command that was sent to the server. Return parameters of this command
* may be read from this event object.FAILED If an action could not be completed successfull this is
* indicated by a failed-Event.KICKED Kicked event appear when the master user of a room leaves
* his rooms. The room is then removed and all players that where bound to that room
* are kicked and thrown back to the lobby. This does NOT mean that the client has been
* disconnected. But he's not anymore bound to any room and has to join again.ACTION_CONNECTING)*/
public var myId:Number;
/** Contains the room-id after an ACTION_ROOM_CREATE or an ACTION_ROOM_JOIN */
public var roomId:Number;
/** Contains the room-name after an ACTION_ROOM_CREATE, an ACTION_ROOM_JOIN or an ACTION_ROOM_INFORMATION*/
public var roomName:String;
/** Contains the maximum room capacity after a ACTION_ROOM_INFORMATION */
public var roomCapacity:Number;
/** Contains wether the room is locked or not after an ACTION_ROOM_INFORMATION */
public var roomLocked:Boolean;
/** Contains the room size (how many people are already in there) after an ACTION_ROOM_INFORMATION */
public var roomSize:Number;
/** Contains the message that has been send after any of the MESSAGE_... eventTypes. */
public var message:String;
/** Contains the id of the sender (or 0 for the server itself) after any of the MESSAGE_... eventTypes. */
public var senderId:Number;
/** Contains the name of the sender (or something like "Server") after any of the MESSAGE_... eventTypes. */
public var senderName:String;
/** The dataArray contains a list of values after any server command that issues a list.
* The number of values returned by the server can be retrieved via dataArray.size().
* In case of an ACTION_ROOM_LIST the array contains elements with the roomId and
* the roomName that can be retrieved via dataArray[0].roomId or dataArray[0].roomName.
*
In case of an ACTION_USER_LIST or an ACTION_USER_LIST_ROOM the
* dataArray contains userId and userName of each user that can be access by dataArray[0].userId
* and dataArray[0].userName.
*