This guide applies to both Actionscript2 and Actionscript3.

General Overview

The 3 ways to use scores in your game.

  • (Easy) Use the submitList function to handle submissions and displaying of a high score table.
  • (Medium) Use the submit and list functions to submit and display at different times.
  • (Hard) Use the submit and listCustom function to have unique scores interface.

Important Concepts

  • Add a High Scores button to the main menu so players can see other people's scores.
  • Use something like a Submit Score button so players know when their score is being submitted.
  • If a score is submitted automatically, notifify players that it has been saved.

Functions

The following is the list of functions that can be used with Advanced Scores. Please follow the links to the reference to understand the arguments available.

advancedScoreSubmitList

advancedScoreSubmit

advancedScoreList

advancedScoreListCustom

advancedScoreListPlayer

Handling Data

As mentioned on The Basics page, the handleIDNET function is where all data from the APIs will be sent. From the above list, only submit, listCustom, and listPlayer return data.

function handleIDNET(e:Event) {
    if (idnet.type == 'advancedScoreSubmit') {
        trace(JSON.stringify(idnet.data));
    }
    if (idnet.type == 'advancedScoreListCustom') {
        trace(JSON.stringify(idnet.data));
    }
    if (idnet.type == 'advancedScoreListPlayer') {
        trace(JSON.stringify(idnet.data));
    }
}