This tutorial is on the NameTextUtil that is found in the Tweaked Whirled SDK. If you do not know how to make an avatar yet, you should check out the tutorial on that. This tutorial implies you know how to work with AS3 and colors in Hex format.


NameTextUtil is a part of the SDK that works on setting custom strings of text to be displayed with the avatar. These strings of text can have their color and thickness (of the outside color, since the text uses 2 colors for the strings) manipulated. This was made by a player on Whirled named "Riazaku".

Setting up the colored nickname

If you want to add it to an existing avatar


Warning! Before you attempt this, please make a copy of your .fla project file, otherwise, you may lose data.

  1. Find the code in your avatar that sets up the hotspot and move speed.
  2. Copy them over somewhere safe.
  3. Open the "\whirled\examples\avatars\NameTextUtil Example.fla" file in the Tweaked Whirled SDK - it contains all the code and the library item you need to copy into your avatar's library.
  4. Replace the code in your avatar with the one that is found in the .fla file mentioned previously.
  5. Find the saved code for setting up the hotspot and move speed and copy it under the _body line.
  6. Find the lines that have Hex color codes in them.
  7. Paste your color codes into them. You can use this site to help you find the color. (Warning: # is the same as 0x, so keep that in mind. Example is #bd0fa3 → 0xbd0fa3.)
  8. Find the line for the width of the scene (it should be in the bottom of the code) and replace "w" with the width of your stage.
  9. Find the line for the Y location of your nickname & adjust it so it would appear above the avatar in the stage, but still remain in the stage. (If it zoomed out enough or close to the edge, it may get cut off.)
  10. Save and test your avatar out on Glowbe!

If you want to add it to a new avatar

The steps are pretty much the same, except 1st and 2nd don't exist and 5th step is when you will set up the hotspot and move speed.


There are also things to mention about it.

  • This uses 3 coordinates instead of 2 - the extra coordinate being "z", which is depth. You should leave it at 9999 if you want to have a custom nickname instead. If you want to add a simple color string instead, remove the "z" coordinate entirely and adjust the Y coordinate of the string (step 9).
  • The code contains some fixes for the flipping of the avatar - that is why the AvatarIcon object needs to be present. You shouldn't remove it, since it isn't gonna do much - it's not supposed to be visible anyhow.
  • The code will automatically grab your nickname as the string of text to display. (In the preview, it will grab the name of the avatar.) If you want to display a custom string instead, edit the line...
NameTextUtil.setTextContent(String(_ctrl.getEntityProperty(EntityControl.PROP_NAME, _ctrl.getMyEntityId())));
  • be something like this, where customstringhere is the string you want to have displayed.