why can't i save ranking?? i think it's api problem... but i don't know exactly it works. i forked this source and it doesn't work well. please help me...
/**
* Copyright 9re ( http://wonderfl.net/user/9re )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/hkqj
*/
package
{
import com.bit101.components.Component;
import com.bit101.components.PushButton;
import flash.display.Sprite;
import net.wonderfl.score.basic.BasicScoreForm;
import net.wonderfl.score.basic.BasicScoreRecordViewer;
/**
* @see http://wonderfl.net/static/asdoc/score
*/
import flash.text.TextField;
public class Test extends Sprite
{
private var _tfStatus:TextField;
private var _form:BasicScoreForm;
public function Test()
{
// set up stage : noscale, top-left align
Component.initStage(stage);
// to make the code short, define the score
// as a random number for now.
var score:int = 1000 * Math.random();
_form = new BasicScoreForm(this, (465-BasicScoreForm.WIDTH)/2, (465-BasicScoreForm.HEIGHT)/2, score, 'SAVE SCORE', showRanking);
}
private function showRanking($didSavedScore:Boolean):void {
_tfStatus = new TextField;
_tfStatus.text = 'saved score : ' + $didSavedScore;
addChild(_tfStatus);
// removes form
removeChild(_form);
var ranking:BasicScoreRecordViewer = new BasicScoreRecordViewer(this, (465-BasicScoreRecordViewer.WIDTH)/2,(465-BasicScoreRecordViewer.HEIGHT)/2,'RANKING', 99, true);
}
}
}