Lesson 5 - Adding custom Logos and Avatars


In this chapter we will learn how to

  1. Add a custom logo.
  2. Add user avatars.

Adding a Logo

An additional key passed in gotCustomInfo is a logo URL for monetizing purposes.
T.custom(CUSTOM_INFO_KEY_logoFullUrl,"");

Adding user avatars

After each user connects to the server, each user in the game will get a gotUserInfo callback describing a set of custom values about the connecting user, such as name, avatar, credibility, etc.

To get a user's avatar, we will override the gotUserInfo function,call:
override public function gotUserInfo(userId:int, infoEntries:Array):void { }

userId - the unique user Id of the player described in the gotUserInfo callback.

infoEntries - an array of InfoEntry elements, each having a key and a value, in this case we will look for the key USER_INFO_KEY_avatar_url and then take the appropriate value.