Packagecom.myflashlab.air.extensions.gameCenter
Classpublic class GameCenter
InheritanceGameCenter Inheritance Object

Create experiences that keep players coming back to your game. Add leaderboards, achievements, matchmaking, challenges, and more.



Public Properties
 PropertyDefined By
  cache : Cache
[static] [read-only]
GameCenter
  localPlayer : LocalPlayer
[static] [read-only]
GameCenter
Public Methods
 MethodDefined By
  
init():void
[static] This will initialize the GameCenter ANE in your project.
GameCenter
  
loadAchievementDescriptions($callback:Function):void
[static]
GameCenter
  
openNativeWindow($leaderboardId:String, $viewState:int, $timeScope:int, $callback:Function = null):void
[static] Opens a native window over your AIR app showing different views about GameCenter
GameCenter
  
showBanner($title:String, $msg:String, $duration:int = 1, $callback:Function = null):void
[static] A notification banner that displays text to the player.
GameCenter
Public Constants
 ConstantDefined By
  EXTENSION_ID : String = com.myflashlab.air.extensions.gameCenter
[static]
GameCenter
  VERSION : String = 0.0.11
[static]
GameCenter
Property Detail
cacheproperty
cache:Cache  [read-only]


Implementation
    public static function get cache():Cache
localPlayerproperty 
localPlayer:LocalPlayer  [read-only]


Implementation
    public static function get localPlayer():LocalPlayer
Method Detail
init()method
public static function init():void

This will initialize the GameCenter ANE in your project. This must be called once and before any other methods.

loadAchievementDescriptions()method 
public static function loadAchievementDescriptions($callback:Function):void

Parameters

$callback:Function

openNativeWindow()method 
public static function openNativeWindow($leaderboardId:String, $viewState:int, $timeScope:int, $callback:Function = null):void

Opens a native window over your AIR app showing different views about GameCenter

Parameters

$leaderboardId:String
 
$viewState:int (default = NaN)
 
$timeScope:int (default = NaN)
 
$callback:Function (default = null)function():void will be called when the native window is dismissed.

showBanner()method 
public static function showBanner($title:String, $msg:String, $duration:int = 1, $callback:Function = null):void

A notification banner that displays text to the player.

Parameters

$title:String
 
$msg:String
 
$duration:int (default = 1) — default value is 1 second
 
$callback:Function (default = null)function($title:String, $message:String):void will be called when the banner is dismissed.

Constant Detail
EXTENSION_IDConstant
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.gameCenter

VERSIONConstant 
public static const VERSION:String = 0.0.11