Packagecitrus.utils
Classpublic dynamic class AGameData
InheritanceAGameData Inheritance flash.utils.Proxy

This is an (optional) abstract class to store your game's data such as lives, score, levels or even complex objects... identified by strings. the dataChanged signal is dispatched when any property changes with its name and value as arguments. if typeVerification is set to true, you will get an error thrown when you try to change a property with a value of different type. you can extend AGameData to synchronize your data with a shared object or a server for example (keep operations on shared objects/server to a strict minimum by "flushing" and "reading" values from them only when necessary...) or simply extend it to setup initial values in your custom AGameData constructor.



Public Properties
 PropertyDefined By
  dataChanged : Signal
dispatched when a property is defined or changed.
AGameData
  typeVerification : Boolean = true
throw an argument error when trying to change a property with a value of a different type.
AGameData
Public Methods
 MethodDefined By
  
AGameData
  
destroy():void
AGameData
Protected Methods
 MethodDefined By
  
callProperty(methodName:*, ... args):*
[override]
AGameData
  
deleteProperty(name:*):Boolean
[override]
AGameData
  
getDescendants(name:*):*
[override]
AGameData
  
getProperty(name:*):*
[override]
AGameData
  
hasProperty(name:*):Boolean
[override]
AGameData
  
isAttribute(name:*):Boolean
[override]
AGameData
  
nextName(index:int):String
[override]
AGameData
  
nextNameIndex(index:int):int
[override]
AGameData
  
nextValue(index:int):*
[override]
AGameData
  
setProperty(name:*, value:*):void
[override]
AGameData
Property Detail
dataChangedproperty
public var dataChanged:Signal

dispatched when a property is defined or changed.

typeVerificationproperty 
public var typeVerification:Boolean = true

throw an argument error when trying to change a property with a value of a different type.

Constructor Detail
AGameData()Constructor
public function AGameData()



Method Detail
callProperty()method
override flash_proxy function callProperty(methodName:*, ... args):*

Parameters

methodName:*
 
... args

Returns
*
deleteProperty()method 
override flash_proxy function deleteProperty(name:*):Boolean

Parameters

name:*

Returns
Boolean
destroy()method 
public function destroy():void

getDescendants()method 
override flash_proxy function getDescendants(name:*):*

Parameters

name:*

Returns
*
getProperty()method 
override flash_proxy function getProperty(name:*):*

Parameters

name:*

Returns
*
hasProperty()method 
override flash_proxy function hasProperty(name:*):Boolean

Parameters

name:*

Returns
Boolean
isAttribute()method 
override flash_proxy function isAttribute(name:*):Boolean

Parameters

name:*

Returns
Boolean
nextName()method 
override flash_proxy function nextName(index:int):String

Parameters

index:int

Returns
String
nextNameIndex()method 
override flash_proxy function nextNameIndex(index:int):int

Parameters

index:int

Returns
int
nextValue()method 
override flash_proxy function nextValue(index:int):*

Parameters

index:int

Returns
*
setProperty()method 
override flash_proxy function setProperty(name:*, value:*):void

Parameters

name:*
 
value:*