Package | com.whirled.avrg |
Class | public class OfflinePlayerPropertyControl |
Inheritance | OfflinePlayerPropertyControl ![]() ![]() ![]() ![]() |
Implements | PropertySubControl |
Property | Defined by | ||
---|---|---|---|
_props : Object | OfflinePlayerPropertyControl |
Method | Defined by | ||
---|---|---|---|
OfflinePlayerPropertyControl(parent:AbstractControl, playerId:int, props:Object)
| OfflinePlayerPropertyControl | ||
![]() |
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 | |
get(propName:String):Object
| OfflinePlayerPropertyControl | ||
getPropertyNames(prefix:String = ""):Array
Get the names of all currently-set properties that begin with the specified prefix.
| OfflinePlayerPropertyControl | ||
![]() |
getTargetId():int
Get the targetId on which this control operates.
| TargetedSubControl | |
![]() |
isConnected():Boolean
Are we connected and running inside the whirled environment, or has someone just
loaded up our SWF by itself?
| AbstractSubControl | |
![]() |
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 |
_props | property |
protected var _props:Object
OfflinePlayerPropertyControl | () | constructor |
public function OfflinePlayerPropertyControl(parent:AbstractControl, playerId:int, props:Object)
Parameters
parent:AbstractControl |
|
playerId:int |
|
props:Object |
get | () | method |
public function get(propName:String):Object
Parameters
propName:String |
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.
Parametersprefix:String (default = " ")
|
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().
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.
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.
|