Package | com.myflashlab.air.extensions.gameCenter |
Class | public class SavedGame |
Inheritance | SavedGame flash.events.EventDispatcher |
loadData
method to load the data into your app.
Property | Defined By | ||
---|---|---|---|
deviceName : String [read-only]
The name of the device that created the saved game data. | SavedGame | ||
modificationDate : Date [read-only]
The date when the saved game file was modified. | SavedGame | ||
name : String [read-only]
The name of the saved game. | SavedGame |
Method | Defined By | ||
---|---|---|---|
loadData($callback:Function):void
Loads previously retrieved saved game data. | SavedGame |
deviceName | property |
deviceName:String
[read-only] The name of the device that created the saved game data. The device name is equal to whatever the user has named his or her device. For example, "Bob's iPhone", "John's Macbook Pro".
public function get deviceName():String
modificationDate | property |
modificationDate:Date
[read-only] The date when the saved game file was modified.
public function get modificationDate():Date
name | property |
name:String
[read-only] The name of the saved game. You can allow users to name their own saved games, or you can create a saved game name automatically.
public function get name():String
loadData | () | method |
public function loadData($callback:Function):void
Loads previously retrieved saved game data.
Below shows what parameters the callback function must havefunction($savedGame:SavedGame, $gameData:String, $error:String):void { // $savedGame: is a reference to the object which initiated this method. // $gameData: is an object that contains the retrieved saved data information. // $error: If an error occurred, this parameter holds an error object that describes the problem. If the saved game data was successfully retrieved, this parameter's value is nil. }
Parameters
$callback:Function — is called after loading a saved game. $gameData
|