Packageverlocity.components
Classpublic final class verSave
InheritanceverSave Inheritance Component Inheritance Singleton Inheritance Object

Saves/loads local data for storage. Easily saves/loads player data such as progress, score, or settings. Data is saved in SharedObjects. Note: Because this relies on SharedObjects, there may be cases of unable to save data as the client can disable this feature. If your game requires a lot of saving it would be wise to compile Verlocity as an AIR application and save/load local data as files. Also keep in mind that saved data can only be loaded from the same SWF file at the same location.



Public Properties
 PropertyDefined By
 InheritedclassName : Object
[read-only] Returns the class name of the component for dictionary registration.
Component
Protected Properties
 PropertyDefined By
 Inheritedstage : Stage
Component
Public Methods
 MethodDefined By
  
Constructor of the component.
verSave
  
_Destruct():void
[override] Destructor of the component.
verSave
 Inherited
_IsNotUpdating():Boolean
Returns if the component is not updating (paused).
Component
 Inherited
_IsValid():Boolean
Returns if this singleton is active/valid.
Singleton
 Inherited
_SetUpdating(bUpdating:Boolean):void
Pauses/resumes the component updating, if it's pausable.
Component
 Inherited
Updates the component, if possible.
Component
  
Delete(sPackageName:String):void
Deletes the data based on its string name.
verSave
  
Load(sPackageName:String):Object
Loads the data based on its string name.
verSave
  
Save(data:Object, sPackageName:String):void
Saves a data object into a SharedObject.
verSave
Protected Methods
 MethodDefined By
 Inherited
Called if verConsole is enabled, used to create concommands for the component.
Component
 Inherited
_Update():void
Called each engine tick (verEngine), if the component updates
Component
Constructor Detail
verSave()Constructor
public function verSave()

Constructor of the component.

Method Detail
_Destruct()method
override public function _Destruct():void

Destructor of the component.

Delete()method 
public final function Delete(sPackageName:String):void

Deletes the data based on its string name.

Parameters

sPackageName:String — The string name of the data

Load()method 
public final function Load(sPackageName:String):Object

Loads the data based on its string name.

Parameters

sPackageName:String — The string name of the data

Returns
Object
Save()method 
public final function Save(data:Object, sPackageName:String):void

Saves a data object into a SharedObject. Note: Game name is appended to the data automatically.

Parameters

data:Object — The object with the data to save
 
sPackageName:String — The string name of the data