PlayerIO

The fastest way to build online games without breaking a sweat.

ActionScript3 Reference

actionscript 3 OneScore class informationClass OneScore

Namespace: playerio
Language: ActionScript 3

The Player.IO OneScore service

Properties

 
public
percentile :Number [read-only]

The percentile compared to all other players. A value from 0 -> 100. A value of 30.0 means you are in the bottom 30% of players. A value of 100 means you are in the top 100% with other players.

public
score :int [read-only]

OneScore value

public
topRank :int [read-only]

The absolute ranking of this player, if they are one of the top 1000 players. 0 otherwise.

Methods

 
public
add (score:int, callback:Function = null, errorHandler:Function = null):void

Adds the score to the OneScore for the user.

public
load (userIds:Array, callback:Function = null, errorHandler:Function = null):void

Loads OneScore for multiple users.

public
refresh (callback:Function = null, errorHandler:Function = null):void

Refresh OneScore for the user.

public
set (score:int, callback:Function = null, errorHandler:Function = null):void

Sets OneScore for the user.

OneScore.percentile

public
percentile :Number [read-only]

The percentile compared to all other players. A value from 0 -> 100. A value of 30.0 means you are in the bottom 30% of players. A value of 100 means you are in the top 100% with other players.

OneScore.score

public
score :int [read-only]

OneScore value

OneScore.topRank

public
topRank :int [read-only]

The absolute ranking of this player, if they are one of the top 1000 players. 0 otherwise.

OneScore.add

public
add (score:int, callback:Function = null, errorHandler:Function = null):void

Adds the score to the OneScore for the user.

Arguments

score:int
The score to add for the user.
callback:Function (Default = null)
Callback that will be called when the operation succeeds.
errorHandler:Function (Default = null)
Callback that will be called instead of callback if an error occurs during the operation.

OneScore.load

public
load (userIds:Array, callback:Function = null, errorHandler:Function = null):void

Loads OneScore for multiple users.

Arguments

userIds:Array
The user ids to load OneScore for.
callback:Function (Default = null)
Callback that will be called when the operation succeeds.
errorHandler:Function (Default = null)
Callback that will be called instead of callback if an error occurs during the operation.

OneScore.refresh

public
refresh (callback:Function = null, errorHandler:Function = null):void

Refresh OneScore for the user.

Arguments

callback:Function (Default = null)
Callback that will be called when the operation succeeds.
errorHandler:Function (Default = null)
Callback that will be called instead of callback if an error occurs during the operation.

OneScore.set

public
set (score:int, callback:Function = null, errorHandler:Function = null):void

Sets OneScore for the user.

Arguments

score:int
The score to set for the user.
callback:Function (Default = null)
Callback that will be called when the operation succeeds.
errorHandler:Function (Default = null)
Callback that will be called instead of callback if an error occurs during the operation.