Packagecom.whirled.avrg
Classpublic class RoomSubControlClient
InheritanceRoomSubControlClient Inheritance RoomSubControlBase Inheritance TargetedSubControl Inheritance AbstractSubControl Inheritance AbstractControl Inheritance flash.events.EventDispatcher

Provides AVR services for a client player's current room.

See also

AVRGameControl.room


Public Properties
 PropertyDefined by
  props : PropertyGetSubControl
[read-only] Accesses the read-only properties associated with this room.
RoomSubControlClient
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
  
canManageRoom(memberId:int = 0):Boolean
Can the specified memberId manage the current room?
RoomSubControlClient
 Inherited
doBatch(fn:Function, ... args):void
Execute the specified function as a batch of commands that will be sent to the server together.
AbstractSubControl
 Inherited
Gets all available information on the avatar of a player with the given id.
RoomSubControlBase
  
getEntityIds(type:String = null):Array
Enumerates the ids of all entities in this room.
RoomSubControlClient
  
getEntityProperty(key:String, entityId:String = null):Object
Looks up and returns the specified property for the specified entity.
RoomSubControlClient
  
Accesses a previosly spawned MOB in this room.
RoomSubControlClient
  
getMusicId3():Object
Get the id3 metadata of the currently playing music.
RoomSubControlClient
 Inherited
Get the playerId of the owner of the currently playing music, aka the player who added it to the playlist, or 0 if there is no music currently playing.
RoomSubControlBase
 Inherited
Gets an array of the ids of all the occupants in this room.
RoomSubControlBase
 Inherited
getOccupantName(playerId:int):String
Get the name of the specified occupant, who may be a player, or null if not found.
RoomSubControlBase
 Inherited
getPlayerIds():Array
Gets an array of the ids of all the players in this room.
RoomSubControlBase
 Inherited
getRoomBounds():Rectangle
Get the room's bounds in pixel coordinates.
RoomSubControlBase
  
getRoomId():int
Gets the id of this room.
RoomSubControlClient
 Inherited
getRoomName():String
Returns the name of this room.
RoomSubControlBase
 Inherited
Returns an array of Strings corresponding to the ids of all the MOBs in this room.
RoomSubControlBase
 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
isPlayerHere(id:int):Boolean
Tests if a player of a given id is in this room.
RoomSubControlBase
  
removeDecoration(playerId:int):void
Removes the previously assigned decoration on a given player.
RoomSubControlClient
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Unregisters an event listener.
AbstractControl
  
setDecoration(playerId:int, decoration:DisplayObject):void
Assigns an object to decorate the given player.
RoomSubControlClient
Events
 EventSummaryDefined by
 Inherited Dispatched when something has changed about a player's avatar in this room.RoomSubControlBase
   Dispatched to entities when they overhear chatter in the room.RoomSubControlClient
 Inherited Dispatched when a MOB has been created.RoomSubControlBase
   Dispatched when a message arrives with information that is not part of the shared game state.RoomSubControlClient
   Dispatched when id3 data is found in the currently playing song.RoomSubControlClient
 Inherited Dispatched when music starts playing in the room.RoomSubControlBase
 Inherited Dispatched when music stops playing in the room.RoomSubControlBase
 Inherited Dispatched either when somebody in this room entered our current game, or somebody playing the game entered this room.RoomSubControlBase
 Inherited Dispatched either when somebody in this room left our current game, or somebody playing the game left this room.RoomSubControlBase
 Inherited Dispatched when a player in this room takes up a new location.RoomSubControlBase
 Inherited Dispatched when a signal has been received in this room.RoomSubControlBase
 Inherited Event.UNLOAD Dispatched when the SWF using this control has been unloaded.AbstractControl
Property detail
propsproperty
props:PropertyGetSubControl  [read-only]

Accesses the read-only properties associated with this room. To change properties use your server agent's RoomSubControlServer's props.

Implementation
    public function get props():PropertyGetSubControl

See also

Method detail
canManageRoom()method
public function canManageRoom(memberId:int = 0):Boolean

Can the specified memberId manage the current room?

Parameters
memberId:int (default = 0)

Returns
Boolean
getEntityIds()method 
public function getEntityIds(type:String = null):Array

Enumerates the ids of all entities in this room.

Parameters
type:String (default = null) — an optional filter to restrict the results to a particular type of entity, currently one of 'furni', 'avatar' or 'pet'.

Returns
Array
getEntityProperty()method 
public function getEntityProperty(key:String, entityId:String = null):Object

Looks up and returns the specified property for the specified entity. Returns null if the entity does not exist or the entity has no such property.

Parameters
key:String
 
entityId:String (default = null)

Returns
Object
getMobSubControl()method 
public function getMobSubControl(id:String):MobSubControlClient

Accesses a previosly spawned MOB in this room.

Parameters
id:String

Returns
MobSubControlClient

See also

getMusicId3()method 
public function getMusicId3():Object

Get the id3 metadata of the currently playing music. This will be an Object roughly in the format of flash.media.Id3Info, except that only the "raw" names of id3 tags are supported. http://www.id3.org

Returns
Object
getRoomId()method 
public override function getRoomId():int

Gets the id of this room. Room ids are the same as scene ids and are the same each time the room is visited. They may also be used directly to access a scene (www.whirled.com/#world-s{sceneId}).

Returns
int
removeDecoration()method 
public function removeDecoration(playerId:int):void

Removes the previously assigned decoration on a given player.

Parameters
playerId:int
setDecoration()method 
public function setDecoration(playerId:int, decoration:DisplayObject):void

Assigns an object to decorate the given player.

Parameters
playerId:int
 
decoration:DisplayObject
Event detail
chatReceivedevent 
Event object type: com.whirled.ControlEvent
ControlEvent.type property = com.whirled.ControlEvent.CHAT_RECEIVED

Dispatched to entities when they overhear chatter in the room.

An event type dispatched to all entities when someone chats. Note that only the instance in control receives this event.
name - the speaker's entity ID
value - chat message

MsgReceivedevent  
Event object type: com.whirled.net.MessageReceivedEvent
MessageReceivedEvent.type property = com.whirled.net.MessageReceivedEvent.MESSAGE_RECEIVED

Dispatched when a message arrives with information that is not part of the shared game state.

The type of all MessageReceivedEvents.

See also

musicId3event  
Event object type: com.whirled.ControlEvent
ControlEvent.type property = com.whirled.ControlEvent.MUSIC_ID3

Dispatched when id3 data is found in the currently playing song. Apparently many mp3 files contain both 2.id3 data, near the beginning of the file, and 1.data, found at the end, and so flash dispatches each set of data as it finds it. And we just pass it along to you.

An event that may be dispatched soon after music starts playing.
name - unused
value - an Object from which id3 tags may be read.