Heyzap Social Integration Tutorials
The following tutorials are designed to guide you through adding Heyzap Social to your flash game.
The current latest Heyzap developer tools API version is 3.3.1.
Contents
Show The Social Bar On Your Game
To use Heyzap Social, you'll need to download and install the Heyzap tools.
The social bar is one of our developers' favorite products. It increases virality of your game by constantly encouraging users to share; it increases your CPM (if payments are installed) by linking to the store; and it engages your users by constantly showing their Facebook or Twitter profile information.
The social bar takes up the bottom 25 pixels of your game screen. It remains there throughout gameplay.
To show the bar, call showSocialBar.
Code Snippet:
HeyzapTools.send("showSocialBar");
Example Screenshot:
Related API Links:
Messages: showSocialBarShow A Leaderboard In Your Game
To use Heyzap Social, you'll need to download and install the Heyzap tools.
Heyzap Leaderboards increase the fun your players have in your game and encourages them to invite their friends to play!
First, set up your leaderboard. To do this, go to your developer dashboard, select your game, click on the "Leaderboards" tab, and click on "Create your first leaderboard."
In order to use Heyzap Leaderboards you will need to submit your players' scores as they achieve them. Scores are submitted through the submitScore api call.
Code Snippet:
HeyzapTools.send("submitScore", {score: 1000, leaderboard_key: 'normal'});
Example Screenshot:
After a user submits their score, they are then prompted to share their score to social networks such as Facebook and Twitter. They will also be able to browse their friends' high scores as well as scores from around the world.
Showing Players' High Scores
To show your players a list of high scores, you can either show the Leaderboard popup, or the Leaderboard bar.
Leaderboard Popup
The leaderboard popup is designed to be shown at the appropriate times in your game, for example when the user clicks a "View High Scores" button. In order to show the leaderboard just call showLeaderboard.
Code Snippet:
HeyzapTools.send("showLeaderboard");
Example Screenshot:
To hide the leaderboard just call hideLeaderboard:
Code Snippet:
HeyzapTools.send("hideLeaderboard");
Leaderboard Bar
The leaderboard panel is automatically positioned at the bottom of your game and is designed to be shown at all times during game play. In order to show the leaderboard just call showLeaderboardPanel.
Code Snippet:
HeyzapTools.send("showLeaderboardPanel");
Example Screenshot:
To hide the leaderboard bar just call hideLeaderboardPanel:
Code Snippet:
HeyzapTools.send("hideLeaderboardPanel");
Related API Links:
Messages: submitScore, showLeaderboard, hideLeaderboard, showLeaderboardPanel, hideLeaderboardPanelShare Game Scores On Social Networks
To use Heyzap Social, you'll need to download and install the Heyzap tools.
To let the players of your game share their scores on social networks such as Facebook and Twitter, paste the following ActionScript at the desired point in your code, eg. at the end of a level:
Code Snippet:
HeyzapTools.send("shareScore", {score: 1000});
Example Screenshot:
Sending the shareScore message will show an in-game popup which allows your players to choose where to share their score.
Any time shareScore is called, a player's score is saved, so it will appear in leaderboards. You can easily show a social leaderboard in your game.
Related API Links:
Messages: shareScoreShare Game Progress On Social Networks
To use Heyzap Social, you'll need to download and install the Heyzap tools.
To let the players of your game share their game progress on social networks such as Facebook and Twitter, paste the following ActionScript at the desired point in your code, eg. "Completed the game"
Code Snippet:
HeyzapTools.send("shareStatus", {status: "Completed Level 4"});
Example Screenshot:
Sending the shareStatus message will show an in-game popup which allows your players to choose where to share their game progress.
Related API Links:
Messages: shareStatusShow A Sharing Panel On Your Game
To use Heyzap Social, you'll need to download and install the Heyzap tools.
A great way to spread your games is to encourage users to share your game virally on Social Networks. The share panel allows you to do exactly that. We recommend showing the share panel in the menu screen for your game.
To start call showSharePanel, as always with our panels you can pass x, y co-ordinates to position the share panel manually
Code Snippet:
HeyzapTools.send("showSharePanel");
Example Screenshot:
If you would like to hide the share panel simply call hideSharePanel
Code Snippet:
HeyzapTools.send("hideSharePanel");
Related API Links:
Messages: showSharePanel, hideSharePanelShow An Invite Friends Panel On Your Game
To use Heyzap Social, you'll need to download and install the Heyzap tools.
Another way to spread your games is to encourage users to invite friends to your game virally on Social Networks or via email. The invite panel allows you to do exactly that. We recommend showing the invite panel in the menu screen for your game.
Show the "invite friends" panel inside your game by pasting the following ActionScript at the desired point in your code. You can pass in x, y co-ordinates, see the showInvitePanel for more details.
Code Snippet:
HeyzapTools.send("showInvitePanel");
Example Screenshot:
To hide just call hideInvitePanel:
Code Snippet:
HeyzapTools.send("hideInvitePanel");


