My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

Score Ranking Library for AS3

Usually, when you want a score ranking feature in your Flash app, you need a server and write serverside code to save scores.

But using this library, you can have a simple score ranking feature in 2 lines of code.

And if you write some more lines, you'll get a full customizable score submit form, and score ranking list view.

The most simple score submit form is:

import net.wonderfl.score.basic.BasicScoreForm;
new BasicScoreForm( this, 0, 0, 9999, "SAVE GAME SCORE", null, "xxxxxxx-app-id-xxxxx", "xxxx-api-key-xxxx" );

where:

  • the form will be addChild-ed to "this"
  • at position (x,y)=(0,0)
  • score is 9999
  • title of the form to be "SAVE GAME SCORE"
  • null callback when completed
  • unique app id where the scores will be associated with, decide it by yourself
  • unique api key to identify your app, get a key from wonderfl APIs

And to fetch ordered scores (aka score ranking):

import net.wonderfl.score.basic.BasicScoreRecordViewer;
new BasicScoreRecordViewer( this, 0, 0, "SCORE RANKING", 20, true, null, "xxxxxxx-app-id-xxxxx", "xxxx-api-key-xxxx" );

where:

  • title of the score ranking list to be "SCORE RANKING"
  • null callback when closed

wow, simple isn't it!


This Score Ranking library is a frontend of the wonderfl.net serverside API.

See the serverside API documents here: GET /score/<appid>, POST /score/<appid>

Powered by Google Project Hosting