Package | com.whirled.avrg |
Class | public class GameSubControlServer |
Inheritance | GameSubControlServer ![]() ![]() ![]() ![]() |
Implements | MessageSubControl |
See also
Property | Defined by | ||
---|---|---|---|
props : PropertySubControl
[read-only]
Accesses the global properties for this game.
| GameSubControlServer |
Method | Defined by | ||
---|---|---|---|
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener.
| AbstractControl | |
![]() |
doBatch(fn:Function, ... args):void
Execute the specified function as a batch of commands that will be sent to the server
together.
| AbstractSubControl | |
![]() |
getItemPacks():Array
Returns the set of all item packs available to this game as an array of objects with the
following properties:
ident - string identifier of item pack name - human readable name of item pack mediaURL - URL for item pack content | GameSubControlBase | |
![]() |
getLevelPacks():Array
Returns the set of all level packs available to this game as an array of objects with the
following properties:
ident - string identifier of item pack name - human readable name of item pack mediaURL - URL for item pack content premium - boolean indicating that content is premium or not | GameSubControlBase | |
![]() |
getOccupantName(playerId:int):String
Get the name of an occupant of the game, or null if not found.
| GameSubControlBase | |
![]() |
getParty(partyId:int):PartySubControl
Get the party control for the specified party.
| GameSubControlBase | |
![]() |
getPartyIds():Array
Return the ids of all parties presently in this game.
| GameSubControlBase | |
![]() |
getPlayerIds():Array
Returns an array of the ids of all players who have joined and not yet quit the game.
| GameSubControlBase | |
![]() |
isConnected():Boolean
Are we connected and running inside the whirled environment, or has someone just
loaded up our SWF by itself?
| AbstractSubControl | |
![]() |
loadItemPackData(ident:String, onLoaded:Function, onFailure:Function):void
Loads the binary data for the item pack with the specified ident.
| GameSubControlBase | |
![]() |
loadLevelPackData(ident:String, onLoaded:Function, onFailure:Function):void
Loads the binary data for the level pack with the specified ident.
| GameSubControlBase | |
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Unregisters an event listener.
| AbstractControl | |
sendMessage(name:String, value:Object = null):void
Sends a message to all players in this game.
| GameSubControlServer |
Event | Summary | Defined by | ||
---|---|---|---|---|
![]() | Dispatched when a message arrives with information that is not part of the shared game state. | GameSubControlBase | ||
![]() | Dispatched when a party arrives in the game. | GameSubControlBase | ||
![]() | Dispatched when a party leaves the game. | GameSubControlBase | ||
Dispatched when a new player joins the game. | GameSubControlServer | |||
Dispatched when a player leaves the game. | GameSubControlServer | |||
![]() | Event.UNLOAD Dispatched when the SWF using this control has been unloaded. | AbstractControl |
props | property |
props:PropertySubControl
[read-only]Accesses the global properties for this game. Game properties marked as such will be persisted and restored whenever the server agent starts. Persistent properties should only be used when genuinely necessary.
Implementation public function get props():PropertySubControl
See also
sendMessage | () | method |
public function sendMessage(name:String, value:Object = null):void
Sends a message to all players in this game. Use carefully since the resulting outgoing
message load could be significant. Games that overload the server are subject to
discretionary action. Players receive game messages by adding a listener to the
GameSubControlClient
.
name:String |
|
value:Object (default = null )
|
See also
playerJoinedGame | event |
com.whirled.avrg.AVRGameControlEvent
com.whirled.avrg.AVRGameControlEvent.PLAYER_JOINED_GAME
Dispatched when a new player joins the game. This event is guaranteed to be the first event
concerning a particular player during that player's session. It will normally be followed
immediately by a ENTERED_ROOM
event.
An event type dispatched when somebody joined the AVRG.
name - not used
value :int - the id of the player who has joined
See also
playerQuitGame | event |
com.whirled.avrg.AVRGameControlEvent
com.whirled.avrg.AVRGameControlEvent.PLAYER_QUIT_GAME
Dispatched when a player leaves the game. This event is guaranteed to be the last event
concerning a particular player during that player's session. Any requests related to the player
will fail after the player has quit. The event will normally be immediately preceded by a
LEFT_ROOM
event.
An event type dispatched when somebody is leaving the AVRG.
name - not used
value :int - the memberId of the player
See also