Game > Flash


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


Kongregate

Start Kongregate API

kong-init-block

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

kongregateInitAPI();

Submit Score

kong-init-block

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)

kong-init-block

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

kongregateIsGuest()

Name of Player

kong-init-block

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.

kongregateGetUsername()

User ID of Player

kong-init-block

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.

kongregateGetUserID()

Newgrounds

Show Ad

show-ad-block

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

newgroundsShowAd();

Submit Score

submit-score-block

Submits a score to the specified Newgrounds leaderboard.

newgroundsSubmitScore([TEXT], [NUMBER]);

Show Scoreboard

show-scoreboard-block

Shows the specified Newgrounds leaderboard.

newgroundsShowScore([TEXT]);

Unlock Medal

unlock-medal-block

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

medal

newgroundsUnlockMedal([TEXT]);

Move Medal Window

move-medal-block

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]);