Packagecom.whirled.party
Classpublic class PartySubControl
InheritancePartySubControl Inheritance TargetedSubControl Inheritance AbstractSubControl Inheritance AbstractControl Inheritance flash.events.EventDispatcher

Provides services on a particular party.



Public Methods
 MethodDefined by
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener.
AbstractControl
 Inherited
doBatch(fn:Function, ... args):void
Execute the specified function as a batch of commands that will be sent to the server together.
AbstractSubControl
  
getGroupId():int
Get the group id of this party.
PartySubControl
  
getGroupLogo():DisplayObject
Get the group logo, or null if called from the server agent.
PartySubControl
  
getGroupName():String
Get the name of the group hosting this party.
PartySubControl
  
Get the leaderId of this party.
PartySubControl
  
getName():String
Get the name of this party.
PartySubControl
  
getPartyId():int
Get the party id, which is only used to identify a transient party instance.
PartySubControl
  
getPlayerIds():Array
Get the player ids in this party that are in this place.
PartySubControl
 Inherited
Get the targetId on which this control operates.
TargetedSubControl
 Inherited
isConnected():Boolean
Are we connected and running inside the whirled environment, or has someone just loaded up our SWF by itself?
AbstractSubControl
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Unregisters an event listener.
AbstractControl
Events
 EventSummaryDefined by
   Dispatched when the leader of the party changes.PartySubControl
   Dispatched when a player arrives in this party.PartySubControl
   Dispatched when a player leaves this party.PartySubControl
 Inherited Event.UNLOAD Dispatched when the SWF using this control has been unloaded.AbstractControl
Public Constants
 ConstantDefined by
  PARTY_ENTERED : String = "partyEntered"
[static] An event type dispatched on the GameSubControl when a party joins the game.
PartySubControl
  PARTY_LEADER_CHANGED : String = "partyLeaderChanged"
[static] An event type dispatched on a PartySubControl when the leader changes.
PartySubControl
  PARTY_LEFT : String = "partyLeft"
[static] An event type dispatched on the GameSubControl when a party leaves the game.
PartySubControl
  PLAYER_ENTERED_PARTY : String = "playerEnteredParty"
[static] An event type dispatched on a PartySubControl when a player joins that party.
PartySubControl
  PLAYER_LEFT_PARTY : String = "playerLeftParty"
[static] An event type dispatched on a PartySubControl when a player leaves that party.
PartySubControl
Method detail
getGroupId()method
public function getGroupId():int

Get the group id of this party. Note that different parties could have the same group id. If the party is no longer present, 0 will be returned.

Returns
int
getGroupLogo()method 
public function getGroupLogo():DisplayObject

Get the group logo, or null if called from the server agent. If the party is no longer present, null will be returned.

Returns
DisplayObject
getGroupName()method 
public function getGroupName():String

Get the name of the group hosting this party. The name should be considered changeable and non-unique and only used for display purposes. The group id can be used for identification of a group. If the party is no longer present, null will be returned.

Returns
String
getLeaderId()method 
public function getLeaderId():int

Get the leaderId of this party.

Returns
int
getName()method 
public function getName():String

Get the name of this party. This is not guaranteed to be unique. If the party is no longer present, null will be returned.

Returns
String
getPartyId()method 
public function getPartyId():int

Get the party id, which is only used to identify a transient party instance. Parties come and go. No permanent identification should be done with this id. This method is a little redundant, because you need to know the id to get this control?

Returns
int
getPlayerIds()method 
public function getPlayerIds():Array

Get the player ids in this party that are in this place. If the party is no longer present, an empty array will be returned.

Returns
Array
Event detail
partyLeaderChangedevent 
Event object type: com.whirled.ControlEvent
ControlEvent.type property = com.whirled.party.PartySubControl.PARTY_LEADER_CHANGED

Dispatched when the leader of the party changes.

playerEnteredPartyevent  
Event object type: com.whirled.ControlEvent
ControlEvent.type property = com.whirled.party.PartySubControl.PLAYER_ENTERED_PARTY

Dispatched when a player arrives in this party.

An event type dispatched on a PartySubControl when a player joins that party.
name - not used
value - the playerId

playerLeftPartyevent  
Event object type: com.whirled.ControlEvent
ControlEvent.type property = com.whirled.party.PartySubControl.PLAYER_LEFT_PARTY

Dispatched when a player leaves this party.

An event type dispatched on a PartySubControl when a player leaves that party.
name - not used
value - the playerId

Constant detail
PARTY_ENTEREDconstant
public static const PARTY_ENTERED:String = "partyEntered"

An event type dispatched on the GameSubControl when a party joins the game.
name - not used
value - partyId

PARTY_LEADER_CHANGEDconstant 
public static const PARTY_LEADER_CHANGED:String = "partyLeaderChanged"

An event type dispatched on a PartySubControl when the leader changes.
name - not used
value - the playerId of the new leader

PARTY_LEFTconstant 
public static const PARTY_LEFT:String = "partyLeft"

An event type dispatched on the GameSubControl when a party leaves the game.
name - not used
value - partyId

PLAYER_ENTERED_PARTYconstant 
public static const PLAYER_ENTERED_PARTY:String = "playerEnteredParty"

An event type dispatched on a PartySubControl when a player joins that party.
name - not used
value - the playerId

PLAYER_LEFT_PARTYconstant 
public static const PLAYER_LEFT_PARTY:String = "playerLeftParty"

An event type dispatched on a PartySubControl when a player leaves that party.
name - not used
value - the playerId