|
metadata
i’ve put this strings into my MovieClip constructor:
var apiPath:String = “[http://www.kongregate.com/flash/API\_AS3\_Local.swf”;](http://www.kongregate.com/flash/API_AS3_Local.swf”;)
Security.allowDomain(apiPath);
var request:URLRequest = new URLRequest(apiPath);
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load(request);
this.addChild(loader);
and this is loadComplete:
function loadComplete(event:Event):void {
kongregate = event.target.content;
kongregate.services.connect();
}
how to call something like:
kongregate.submitScoresForCurrentUser(5600); ?
|
|
metadata
Maybe you could find answers in this page :)
[http://www.kongregate.com/developer\_center/docs/statistics-client-api](http://www.kongregate.com/developer_center/docs/statistics-client-api)
just like:
kongregate.stats.submit(“Coins”,1); // The user collected a coin
kongregate.stats.submit(“MonstersKilled”,1); //The user killed a monster
kongregate.stats.submit(“HighScore”,398); //The user got a score of 398
kongregate.stats.submit(“LapTime”,60); //User finished a lap in 60 seconds
|
|
metadata
what is a class for kongregate variable?
|
|
metadata
???a class?
……I have not upload my game yet ,what I only know is read the doc in that page, and sorry for failed answer your question….
|
|
metadata
Kongregate puts the API class into your game. Just follow the instructions on the page!
|
|
metadata
………………..It is my turn? I have published my first game , and put stat API in the code . But I can not see the achievement board,
…….Maybe tomorrow will be OK ? hehe , i will pray for it :)
|
|
metadata
kongregate.stats.submit(…..) , it is right , but you must connect kongregate at first.
|