I downloaded a leaderboard system SDK (its a SWC) and like the instructions said, I extracted the SWF from it and this is what my extension looks like (see attachment #1). Yes, it's enabled in my game.
However, when I try to use the API code directly in the game, it gives me these errors:
Scores Button (54) - Unexpected <
Scores Button (54) - Unexpected <
Scores Button (54) - Unexpected <
Scores Button (54) - Unexpected <
It's coming from this API code I called (its AS3):
//Load scores
Blocked.loadScores("blocked", TimeScope.ALL_TIME,
function onComplete(scores:Vector.<Score>):void {
trace("retrieved " + scores.length + " scores");
}, function onError(error:String):void {
trace("error loading scores: " + error);
});
(also see attachment #2)
And If I change Vector.<Score> into haxe (which becomes Array<Score>), it gives me other errors like unexpected { and stuff like that. And if I change those, it'll give me another error like Unknown identifier.
Question #1: Do I have to convert the AS3 code snippets I placed inside the game into haxe?
Question #2: If not, what's going on?