Package | org.flixel |
Class | public class FlxSave |
Inheritance | FlxSave Object |
Property | Defined By | ||
---|---|---|---|
data : Object
Allows you to directly access the data container in the local shared object. | FlxSave | ||
name : String
The name of the local shared object. | FlxSave |
Property | Defined By | ||
---|---|---|---|
_so : SharedObject
The local shared object itself. | FlxSave |
Method | Defined By | ||
---|---|---|---|
FlxSave()
Blanks out the containers. | FlxSave | ||
bind(Name:String):Boolean
Automatically creates or reconnects to locally saved data. | FlxSave | ||
erase(MinFileSize:uint = 0):Boolean
Erases everything stored in the local shared object. | FlxSave | ||
forceSave(MinFileSize:uint = 0):Boolean
Writes the local shared object to disk immediately. | FlxSave | ||
read(FieldName:String):Object
If you don't like to access the data object directly, you can use this to read from it. | FlxSave | ||
write(FieldName:String, FieldValue:Object, MinFileSize:uint = 0):Boolean
If you don't like to access the data object directly, you can use this to write to it. | FlxSave |
_so | property |
protected var _so:SharedObject
The local shared object itself.
The default value is null
.
data | property |
public var data:Object
Allows you to directly access the data container in the local shared object.
The default value is null
.
name | property |
public var name:String
The name of the local shared object.
The default value is null
.
FlxSave | () | Constructor |
public function FlxSave()
Blanks out the containers.
bind | () | method |
public function bind(Name:String):Boolean
Automatically creates or reconnects to locally saved data.
Parameters
Name:String — The name of the object (should be the same each time to access old data).
|
Boolean — Whether or not you successfully connected to the save data.
|
erase | () | method |
public function erase(MinFileSize:uint = 0):Boolean
Erases everything stored in the local shared object.
Parameters
MinFileSize:uint (default = 0 ) — If you need X amount of space for your save, specify it here.
|
Boolean — Whether or not the clear and flush was successful.
|
forceSave | () | method |
public function forceSave(MinFileSize:uint = 0):Boolean
Writes the local shared object to disk immediately.
Parameters
MinFileSize:uint (default = 0 ) — If you need X amount of space for your save, specify it here.
|
Boolean — Whether or not the flush was successful.
|
read | () | method |
public function read(FieldName:String):Object
If you don't like to access the data object directly, you can use this to read from it.
Parameters
FieldName:String — The name of the data field you want to read
|
Object — The value of the data field you are reading (null if it doesn't exist).
|
write | () | method |
public function write(FieldName:String, FieldValue:Object, MinFileSize:uint = 0):Boolean
If you don't like to access the data object directly, you can use this to write to it.
Parameters
FieldName:String — The name of the data field you want to create or overwrite.
| |
FieldValue:Object — The data you want to store.
| |
MinFileSize:uint (default = 0 ) — If you need X amount of space for your save, specify it here.
|
Boolean — Whether or not the write and flush were successful.
|