Packagecom.distriqt.extension.gameservices.events
Classpublic class LeaderboardEvent
InheritanceLeaderboardEvent Inheritance flash.events.Event

This event is used to describe any information about Leaderboards.



Public Properties
 PropertyDefined By
  data : *
The data will be dependant on the event, but will either be an array of Leaderboard metadata or score information.
LeaderboardEvent
  leaderboard : Leaderboard = null
The leaderboard that this data is associated with.
LeaderboardEvent
Public Methods
 MethodDefined By
  
LeaderboardEvent(type:String, leaderboard:Leaderboard, data:*, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor
LeaderboardEvent
  
clone():Event
[override]
LeaderboardEvent
Public Constants
 ConstantDefined By
  LEADERBOARDS_ERROR : String = leaderboards:error
[static] Dispatched when there was an error loading the leaderboards.
LeaderboardEvent
  LEADERBOARDS_LOADED : String = leaderboards:loaded
[static] Dispatched when the metadata about the leaderboards has been loaded.
LeaderboardEvent
  PLAYERCENTEREDSCORES_ERROR : String = leaderboard:playercenteredscores:error
[static] Dispatched when there was an error loading the scores for a leaderboard.
LeaderboardEvent
  PLAYERCENTEREDSCORES_LOADED : String = leaderboard:playercenteredscores:loaded
[static] Dispatched when the player centered scores from a leaderboard have been loaded.
LeaderboardEvent
  PLAYERSCORE_ERROR : String = leaderboard:playerscore:error
[static] Dispatched when there was an error loading the player's leaderboard score.
LeaderboardEvent
  PLAYERSCORE_LOADED : String = leaderboard:playerscore:loaded
[static] Dispatched when the player's leaderboard score has been loaded.
LeaderboardEvent
  SCORES_ERROR : String = leaderboard:scores:error
[static] Dispatched when there was an error loading the scores for a leaderboard.
LeaderboardEvent
  SCORES_LOADED : String = leaderboard:scores:loaded
[static] Dispatched when the scores from a leaderboard have been loaded.
LeaderboardEvent
  SUBMITSCORE_ERROR : String = leaderboard:submitscore:error
[static] Dispatched when there was an error submitting a score to a leaderboard.
LeaderboardEvent
  SUBMITSCORE_SUCCESS : String = leaderboard:submitscore:success
[static] Dispatched when a score has been successfully submitted to a leaderboard
LeaderboardEvent
  TOPSCORES_ERROR : String = leaderboard:topscores:error
[static] Dispatched when there was an error loading the top scores for a leaderboard.
LeaderboardEvent
  TOPSCORES_LOADED : String = leaderboard:topscores:loaded
[static] Dispatched when the top scores from a leaderboard have been loaded.
LeaderboardEvent
  UI_CLOSED : String = leaderboard:ui:closed
[static] Dispatched when the displayed leaderboard UI is closed by the user.
LeaderboardEvent
Property Detail
dataproperty
public var data:*

The data will be dependant on the event, but will either be an array of Leaderboard metadata or score information.

leaderboardproperty 
public var leaderboard:Leaderboard = null

The leaderboard that this data is associated with. If this event is not tied to any particular leaderboard this will be null, eg when loadLeaderboards is called.

Constructor Detail
LeaderboardEvent()Constructor
public function LeaderboardEvent(type:String, leaderboard:Leaderboard, data:*, bubbles:Boolean = false, cancelable:Boolean = false)

Constructor

Parameters
type:String
 
leaderboard:Leaderboard
 
data:*
 
bubbles:Boolean (default = false)
 
cancelable:Boolean (default = false)
Method Detail
clone()method
override public function clone():Event

Returns
Event
Constant Detail
LEADERBOARDS_ERRORConstant
public static const LEADERBOARDS_ERROR:String = leaderboards:error

Dispatched when there was an error loading the leaderboards. The data field may contain more information.

LEADERBOARDS_LOADEDConstant 
public static const LEADERBOARDS_LOADED:String = leaderboards:loaded

Dispatched when the metadata about the leaderboards has been loaded.

See also

PLAYERCENTEREDSCORES_ERRORConstant 
public static const PLAYERCENTEREDSCORES_ERROR:String = leaderboard:playercenteredscores:error

Dispatched when there was an error loading the scores for a leaderboard. The data field may contain more information.

PLAYERCENTEREDSCORES_LOADEDConstant 
public static const PLAYERCENTEREDSCORES_LOADED:String = leaderboard:playercenteredscores:loaded

Dispatched when the player centered scores from a leaderboard have been loaded.

For this event the leaderboard will be the leaderboard information that was loaded and the data will contain an Array of LeaderboardScore objects.

See also

PLAYERSCORE_ERRORConstant 
public static const PLAYERSCORE_ERROR:String = leaderboard:playerscore:error

Dispatched when there was an error loading the player's leaderboard score.

This could be due to an issue with the leaderboard or that the player hasn't yet submitted any scores to the specified leaderboard.

PLAYERSCORE_LOADEDConstant 
public static const PLAYERSCORE_LOADED:String = leaderboard:playerscore:loaded

Dispatched when the player's leaderboard score has been loaded.

data will contain an array of one score object, being the players score.

SCORES_ERRORConstant 
public static const SCORES_ERROR:String = leaderboard:scores:error

Dispatched when there was an error loading the scores for a leaderboard. The data field may contain more information.

SCORES_LOADEDConstant 
public static const SCORES_LOADED:String = leaderboard:scores:loaded

Dispatched when the scores from a leaderboard have been loaded.

For this event the leaderboard will be the leaderboard information that was loaded and the data will contain an Array of LeaderboardScore objects.

See also

SUBMITSCORE_ERRORConstant 
public static const SUBMITSCORE_ERROR:String = leaderboard:submitscore:error

Dispatched when there was an error submitting a score to a leaderboard. The data field may contain more information.

SUBMITSCORE_SUCCESSConstant 
public static const SUBMITSCORE_SUCCESS:String = leaderboard:submitscore:success

Dispatched when a score has been successfully submitted to a leaderboard

TOPSCORES_ERRORConstant 
public static const TOPSCORES_ERROR:String = leaderboard:topscores:error

Dispatched when there was an error loading the top scores for a leaderboard. The data field may contain more information.

TOPSCORES_LOADEDConstant 
public static const TOPSCORES_LOADED:String = leaderboard:topscores:loaded

Dispatched when the top scores from a leaderboard have been loaded.

For this event the leaderboard will be the leaderboard information that was loaded and the data will contain an Array of LeaderboardScore objects.

See also

UI_CLOSEDConstant 
public static const UI_CLOSED:String = leaderboard:ui:closed

Dispatched when the displayed leaderboard UI is closed by the user.