Integration with Kongregate Avatars within Game

Subscribe to Integration with Kongregate Avatars within Game 4 posts, 3 voices

 
avatar for cozza cozza 7 posts

Similar to that of Kongregate Racing?

Whereby you can dynamically insert the avatar of the currently signed on user to Kongregate, in to the flash game.

Is this possible?

(sorry about this topic being very vague)

 
avatar for arcaneCoder arcaneCoder 4162 posts

If you are using AS3, you can ask the API for the users avatar, chat avatar, level, points, etc. It will provide you the path to the image, which you can then display in your game.

The server for the AS3 API documentation is down, but it should be back up soon.

EDIT: Site is up. Here is the documentation for the user data you can request:

IUserServices

UserInfo

Example:
import com.kongregate.as3.client.KongregateAPI;

function onUserInfo ( playerData:Object ):void
{
   trace ( "avatar path: "+ playerData.avatarPath );
}

KongregateAPI.getInstance().user.getPlayerInfo ( onUserInfo );

 
avatar for cozza cozza 7 posts

Thank you very much in supplying WAY more info I anticipated. This has helped me continue in my project, i’m extremely happy!

 
avatar for skyboy skyboy 163 posts

does kong also do this with as2? if so i might port my userinfo project to flash