Packagecom.whirled.avrg
Classpublic class OfflinePlayerPropertyControl
InheritanceOfflinePlayerPropertyControl Inheritance TargetedSubControl Inheritance AbstractSubControl Inheritance AbstractControl Inheritance flash.events.EventDispatcher
ImplementsPropertySubControl



Protected Properties
 PropertyDefined by
  _props : Object
OfflinePlayerPropertyControl
Public Methods
 MethodDefined by
  
OfflinePlayerPropertyControl(parent:AbstractControl, playerId:int, props:Object)
OfflinePlayerPropertyControl
 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
  
get(propName:String):Object
OfflinePlayerPropertyControl
  
getPropertyNames(prefix:String = ""):Array
Get the names of all currently-set properties that begin with the specified prefix.
OfflinePlayerPropertyControl
 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
  
set(propName:String, value:Object, immediate:Boolean = false):void
OfflinePlayerPropertyControl
  
setAt(propName:String, index:int, value:Object, immediate:Boolean = false):void
Update one element of an Array.
Note: Unlike setIn(), this update will fail silently if the index is out of bounds or if there is no array currently set at the specified property name.
OfflinePlayerPropertyControl
  
setIn(propName:String, key:int, value:Object, immediate:Boolean = false):void
Update one element of a Dictionary.
Note: Unlike setAt(), this will usually work.
OfflinePlayerPropertyControl
Events
 EventSummaryDefined by
 Inherited Event.UNLOAD Dispatched when the SWF using this control has been unloaded.AbstractControl
Property detail
_propsproperty
protected var _props:Object
Constructor detail
OfflinePlayerPropertyControl()constructor
public function OfflinePlayerPropertyControl(parent:AbstractControl, playerId:int, props:Object)Parameters
parent:AbstractControl
 
playerId:int
 
props:Object
Method detail
get()method
public function get(propName:String):Object

Parameters
propName:String

Returns
Object
getPropertyNames()method 
public function getPropertyNames(prefix:String = ""):Array

Get the names of all currently-set properties that begin with the specified prefix. Calling this method results in no network traffic.

Parameters
prefix:String (default = "")

Returns
Array
set()method 
public function set(propName:String, value:Object, immediate:Boolean = false):void

Parameters
propName:String
 
value:Object
 
immediate:Boolean (default = false)
setAt()method 
public function setAt(propName:String, index:int, value:Object, immediate:Boolean = false):void

Update one element of an Array.
Note: Unlike setIn(), this update will fail silently if the index is out of bounds or if there is no array currently set at the specified property name. Furthermore, if you set the element with immediate=true, there are two updates: one locally that happens right away and the update on the server that will be dispatched back to all the clients. Either or both can fail, so be sure to set the Array up first using set().

Parameters
propName:String — the name of the property to modify.
 
index:int — the array index of the element to update.
 
value:Object — the value to set.
 
immediate:Boolean (default = false) — if true, the value is updated immediately in the local object. Otherwise any old value will remain in effect until the ElementChangedEvent arrives after a round-trip to the server.
setIn()method 
public function setIn(propName:String, key:int, value:Object, immediate:Boolean = false):void

Update one element of a Dictionary.
Note: Unlike setAt(), this will usually work. No key is out of range, obviously, and if you set a value in a property that was previously null, a new Dictionary will be created to hold your value. If a non-Dictionary property is already stored with the specified name then this will fail silently on the server. But: don't do that! It would be pretty bad style to store two different types of property under the same name.

Parameters
propName:String — the name of the property to modify.
 
key:int — the key of the element to update.
 
value:Object — the value to set. Passing null removes the specified key from the Dictionary.
 
immediate:Boolean (default = false) — if true, the value is updated immediately in the local object. Otherwise any old value will remain in effect until the ElementChangedEvent arrives after a round-trip to the server.