Packagecom.myflashlab.air.extensions.gameCenter
Classpublic class SavedGame
InheritanceSavedGame Inheritance flash.events.EventDispatcher

The saved game data. Each SavedGame object contains the following information about a saved game: the name of the device that created the saved game file, the date the saved game file was modified, and the name of the saved game file. Saved game files are manipulated through the local player using one or more of the following methods: After retrieving saved game information, use the loadData method to load the data into your app.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
loadData($callback:Function):void
Loads previously retrieved saved game data.
SavedGame
Property Detail
deviceNameproperty
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".


Implementation
    public function get deviceName():String
modificationDateproperty 
modificationDate:Date  [read-only]

The date when the saved game file was modified.


Implementation
    public function get modificationDate():Date
nameproperty 
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.


Implementation
    public function get name():String
Method Detail
loadData()method
public function loadData($callback:Function):void

Loads previously retrieved saved game data.

Below shows what parameters the callback function must have
     function($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