Game > Flash

For a walkthrough of how to integrate Kongregate and Newgrounds into your game, read our article on Stencylpedia.


Start Kongregate API

start api

Starts up the Kongregate API. Must be used before doing anything with the API.


Submit Score

submit score number to with name text

Submit a score to Kongregate. First field is the name of the statistic. Second field is the value of it (a number).

kongregateSubmitStat([TEXT], [NUMBER]);

Is a Guest? (vs. logged in)

player is a guest

Returns true if a guest is playing your game on Kongregate.


Name of Player

name of player

Returns the username of the player who is playing your game on Kongregate, if one is logged in. If it's a guest, the name will be Guest.


User ID of Player

id of player

Returns the user ID of the player who is playing your game on Kongregate, if one is logged in. If it's a guest, this will come back as blank.



Show Ad

show ad

Immediately shows a Newgrounds ad in the center of the screen. Can be shown at any point in the game.


Submit Score

submit score number to for board text

Submits a score to the specified Newgrounds leaderboard.

newgroundsSubmitScore([TEXT], [NUMBER]);

Show Scoreboard

show scoreboard for board text

Shows the specified Newgrounds leaderboard.


Unlock Medal

unlock medal for text

Unlocks a medal (achievement) by name. Medals are set up on Newgrounds.



Move Medal Window

move medal to x number y number

Sets the default location where the medals are shown. Call this at the beginning of the game - only has to be done once, but it has to be called before the medal shows. This cannot move medal windows that are already visible.

newgroundsSetMedalPosition([NUMBER], [NUMBER]);