Package | com.whirled |
Class | public class PetControl |
Inheritance | PetControl ![]() ![]() ![]() ![]() |
Method | Defined by | ||
---|---|---|---|
PetControl(disp:DisplayObject)
Creates a controller for a Pet.
| PetControl | ||
![]() |
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
Returns true if the local client has management privileges in the current room.
| EntityControl | |
![]() |
clearPopup():void
Clear any showing popup.
| EntityControl | |
![]() |
doBatch(fn:Function, ... args):void
Execute the specified function as a batch of commands that will be sent to the server
together.
| AbstractControl | |
![]() |
getCamera(index:String = null):Camera
Access the local user's camera.
| EntityControl | |
![]() |
getDefaultDataPack():ByteArray
Get the default datapack for this entity, or null if there is none defined.
| EntityControl | |
![]() |
getEntityIds(type:String = null):Array
Enumerates the ids of all entities in this room.
| EntityControl | |
![]() |
getEntityProperty(key:String, entityId:String = null):Object
Looks up and returns the specified property for the specified entity.
| EntityControl | |
![]() |
getEnvironment():String
Get the "environment" in which this entity is presently running.
| EntityControl | |
![]() |
getInstanceId():int
Get the id of the viewer that is viewing this instance.
| EntityControl | |
![]() |
getLogicalLocation():Array
Returns our current logical location in the scene.
| EntityControl | |
![]() |
getMemories():Object
Return an associative hash of all the memories.
| EntityControl | |
![]() |
getMemory(key:String, defval:Object = null):Object
Returns the value associated with the supplied key in this item's memory.
| EntityControl | |
![]() |
getMicrophone(index:int = -1):Microphone
Access the local user's microphone.
| EntityControl | |
![]() |
getMusicId3():Object
Get the id3 metadata of the currently playing music.
| EntityControl | |
![]() |
getMusicOwnerId():int
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.
| EntityControl | |
![]() |
getMyEntityId():String
Returns the Whirled-wide unique ID of this copy of the entity.
| EntityControl | |
![]() |
getOrientation():Number
Returns the current orientation of this mobile.
| ActorControl | |
getOwnerId():int
Get the memberId of this pet's owner.
| PetControl | ||
![]() |
getPixelLocation():Array
Returns our current location in the scene, in pixel coordinates.
| EntityControl | |
![]() |
getRoomBounds():Array
Get the room's bounds in pixels.
| EntityControl | |
![]() |
getState():String
Get the current state.
| ActorControl | |
![]() |
getViewerName(id:int = 0):String
Get the non-unique display name of the user viewing a particular instance.
| EntityControl | |
![]() |
hasControl():Boolean
Detects whether this client is in control.
| EntityControl | |
![]() |
isConnected():Boolean
Are we connected and running inside the whirled environment, or has someone just
loaded up our SWF by itself?
| AbstractControl | |
![]() |
isMoving():Boolean
Returns whether the mobile is currently moving between locations in the scene.
| ActorControl | |
![]() |
registerCustomConfig(func:Function):void
Register a function used for generating a custom config panel.
| EntityControl | |
![]() |
registerPropertyProvider(func:Function):void
Registers a function that provides custom entity properties.
| EntityControl | |
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Unregisters an event listener.
| AbstractControl | |
sendChat(msg:String):void
Send a chat message to the entire room.
| PetControl | ||
![]() |
sendMessage(name:String, arg:Object = null):void
Send a message to other instances of this entity, resulting in a MESSAGE_RECEIVED event.
| EntityControl | |
![]() |
sendSignal(name:String, arg:Object = null):void
Send a message to all instances of all entities in this instance's current room,
resulting in a SIGNAL_RECEIVED event.
| EntityControl | |
![]() |
setHotSpot(x:Number, y:Number, height:Number):void
Set the layout "hotspot" for your item, specified as pixels relative to (0, 0) the top-left
coordinate.
| EntityControl | |
![]() |
setLogicalLocation(x:Number, y:Number, z:Number, orient:Number):void
Requests that our location be updated.
| ActorControl | |
![]() |
setMemory(key:String, value:Object, callback:Function = null):void
Requests that this item's memory be updated with the supplied key/value pair.
| EntityControl | |
![]() |
setMoveSpeed(pixelsPerSecond:Number):void
Set this actor's movement speed, in pixels per second.
| ActorControl | |
![]() |
setOrientation(orient:Number):void
Requests that our orientation be updated.
| ActorControl | |
![]() |
setPixelLocation(x:Number, y:Number, z:Number, orient:Number):void
Requests that our location be updated.
| ActorControl | |
![]() |
setState(state:String):void
Set the state of this actor.
| ActorControl | |
![]() |
setTickInterval(interval:Number):void
Configures the interval on which this item is "ticked" in milliseconds.
| EntityControl | |
![]() |
showPopup(title:String, panel:DisplayObject, width:Number, height:Number, backgroundColor:uint = 0xFFFFFF, backgroundAlpha:Number = 1.0):Boolean
Show a popup to the current user in the whirled.
| EntityControl | |
![]() |
triggerAction(name:String, arg:Object = null):void
Triggers an action on this scene object.
| EntityControl |
PetControl | () | constructor |
public function PetControl(disp:DisplayObject)
Creates a controller for a Pet. The display object is the Pet's visualization.
Parametersdisp:DisplayObject |
getOwnerId | () | method |
public function getOwnerId():int
Get the memberId of this pet's owner. This is just a convenience function to point out the rich API offered by getEntityPropery().
Returnsint |
sendChat | () | method |
public function sendChat(msg:String):void
Send a chat message to the entire room. The chat message will be treated as if it was typed in at the chat message box - it will be filtered. TODO: Any action commands (e.g. /emote) should be handled appropriately.
Parametersmsg:String |