back to uAvatarChat Home  back to  


uAvatarChat Documentation
Installing and using uAvatarChat involves these general steps:

  1. Install or rent Unity 2 Multiuser Server.
  2. Purchase uAvatarChat.
  3. Customize uAvatarChat's settings (optional)
  4. Redesign uAvatarChat's interface from scratch (optional)
  5. Add custom character icons (optional)
  6. Set the location of your Unity 2 Multiuser Server
  7. Add uAvatarChat to your web page
  8. Post the uAvatarChat to your website

The specific steps you must follow to add uAvatarChat to your site vary depending on whether you intend to run Unity 2 Multiuser Server yourself or rent it from a hosting company. The following detailed instructions tell you what to do depending on your situation.

1: Install or Rent Unity 2 Multiuser Server
uAvatarChat requires Unity 2 Multiuser Server (U2MS), which you can run on your own site or rent from a hosting company. Choose the option that applies to you:

2: Purchase uAvatarChat
Order uAvatarChat here, then download and extract the contents of the uAvatarChat.zip archive. (uAvatarChat is also available on CD.)

The directories in the uAvatarChat archive are:

  • /deploy/
    All the files you'll need to post to your host's website (if you're renting U2MS) or to your own website (if you own U2MS).
  • /sounds/
    Source sound files in .wav format.
  • /source/
    Source .fla files and ActionScript class files for optionally reskinning uAvatarChat's interface or extending its functionality.

3: Customize uAvatarChat's Settings
To customize uAvatarChat's settings, follow these instructions:

  1. Open the file /deploy/uAvatarChatSettings.xml in a text editor.
  2. Make changes to the XML values (described next), then save the file.
      • chatRoomID The ID of the chat room (discussed in detail later).
      • helpURL The URL at which application help is posted, including the target window into which the helpURL should load.
      • idleTimeout The amount of time before idle icon ("Zzz") appears.
      • idleCheckFrequency Amount of time between checks for user inactivity. Should be less than idleTimeout.
      • defaultAvatarID The linkage ID of the avatar movie clip to use for new users.
      • msgBubbleBaseTime The amount of time an empty message bubble stays on screen.
      • msgBubbleCharTime The amount of extra time per character a message bubble stays on screen.
      • defaultAvatarSpeed The default speed at which avatars move.
      • maxMessageLength The number of characters that can be sent in a single message.
      • maxMsgBubbleLength The number of characters that can be displayed in a message bubble.
      • backgroundTrigger The number of avatars required for a custom "Group Background" to appear.
      • displayTranscript Enable the transcript by default (true) or disable the transcript by default (false).
      • avatarPanelDimensions The region within which avatars can move (specified by the attributes minX, maxX, minY, and maxY
      • avatars The avatar names, and movie clip linkage ids for avatar icons and their corresponding backgrounds.

    Here's a sample uAvatarSettings.xml file.

4: Redesign uAvatarChat's Interface from Scratch (optional)
If you're a Flash designer, you can completely reskin the uAvatarChat interface:

  1. Open the file /source/uAvatarChat.fla in Flash MX 2004 or higher.
  2. Change graphics as desired. You'll find the main interface graphics on frames in the main document timeline. Other chat assets such as speech bubbles, avatars, and backgrounds are stored in the "avatar chat assets" folder. Component styles (colours, font sizes, etc) are set on the frame labeled "avatarChatInterface" on the main timeline.
  3. Export the movie uAvatarChat.swf.

5: Add custom character icons (optional)
To add new character icons ("avatars") to the chat, follow these steps:

  1. Create the character icon as a movie clip. In the default graphical look and feel, avatars should be approximately 28x28 pixels in size.
  2. Export the new character icon movie clip for ActionScript (using the "Linkage..." command), and set it to not export in the first frame.
  3. Optionally create and export a custom "Group Background" for the character icon. Make sure it is set to not export in the first frame.
  4. At frame 9 of the main timeline, place an instance of your character icon on the layer labeled "dummy avatars".
  5. At frame 10 of the main timeline, place an instance of your "Group Background" (if any) on the layer labeled "dummy bgs".
  6. In the uAvatarChatSettings.xml file (see Step 3), add a new <avatar> tag to the avatars tag. Replace the name, ID, and bg attribute values as follows:
    <avatar name="Your Avatar's On-screen Name" id="avatar_linkage_ID" bg="background_linkage_id" />

6: Set the Location of Your Unity 2 Multiuser Server
Follow these steps to connect uAvatarChat to your Unity 2 Multiuser Server:

  1. Open the file /deploy/uAvatarChatConfig.xml in a text editor. By default, the file will look like this:
    <?xml version="1.0"?>
    <config>
      <server>localhost</server>
      <port>9100</port>
      <logLevel>INFO</logLevel>
    </config>
  2. If you own Unity 2 Multiuser Server and run it on your own site:
    1. Change localhost to the domain or IP address on which you're running U2MS (e.g., mysite.com). Do not include the "http://", just list the domain. Note that this domain should be the same as the domain where you plan to post the uAvatarChat.swf Flash movie. If it's not, see "Running uAvatarChat and Unity 2 Multiuser Server on Different Domains", below.
    2. Change 9100 to the port on which you're running U2MS (e.g., 2000, 1024, etc).
  3. If you rent Unity 2 Multiuser Server from a hosting company:
    1. Change localhost to the domain provided by your hosting company. For more details, see Unity 2 Hosting.
    2. Unless your hosting company provided you with a port other than 9100, leave 9100 as is. For more details, see Unity 2 Hosting.

7: Add uAvatarChat to Your Web Page
Follow these steps to add uAvatarChat to any web page:

  1. Open your web page (.html file) in a text editor or HTML editor.
  2. Copy'n'paste the following <OBJECT> and <EMBED> tags to your .html file, where you want uAvatarChat to appear.


  3. In the <OBJECT> and <EMBED> tags now in your page, change http://www.yoursite.com/chat_directory/ to the domain and directory that will actually contain your uAvatarChat.swf movie. You need to make the change in both places. If you are renting Unity 2 Multiuser Server, your site's domain will be provided by your hosting company.
  4. Save your web page (.html file).

8: Post uAvatarChat to Your Website
Follow these steps to post your chat.

  1. From the /deploy/ directory, upload the following files to your webserver:
    • uAvatarChat.swf
    • uAvatarChatConfig.xml
    • uAvatarChatSettings.xml
    Be sure to place them in the exact directory specified in your web page's <OBJECT> and <EMBED> tags (see Step 5, above). If you are renting Unity 2 Multiuser Server, follow your hosting company's directions for uploading files.
  2. Upload the web page from Step 5 to your website. Note that the site to which you upload your web page may be different than the site to which you upload uAvatarChat.swf (this is often the case if you are renting U2MS from a hosting company).

Your chat should now be live!

If you have any problems with your chat:

Running uAvatarChat on Multiple Pages
You can put uAvatarChat.swf on as many pages as you like. Simply follow Step 7, above, to add the chat to each page. All users will appear in a single chat conversation, no matter what page they're on.

To set up multiple conversations (e.g., one per page), follow these steps:/p>

  1. For each page that contains a chat, create a corresponding directory on your web server. For example, if you want to put the chat on a home.html page and a news.html page, you would create the following directories:
    • /homechat/
    • /newschat/
  2. Into each directory, place a copy of the following files:
    • uAvatarChat.swf
    • uAvatarChatConfig.xml
    • uAvatarChatSettings.xml
  3. Add <OBJECT> and <EMBED> tags to each .html file that contains a chat (as you did earlier in Step 6). For each <OBJECT> and <EMBED> tag, specify the domain and directory that contains the appropriate chat. In the home.html and news.html example, we'd use http://www.yoursite.com/homechat/uAvatarChat.swf for home.html and http://www.yoursite.com/newschat/uAvatarChat.swf for news.html.
  4. Open each copy of uAvatarChatSettings.xml in a text editor.
  5. In each settings file, change "chatroom" in the <chatRoomID> tag to the name of the conversation you want to have. For example, if you put uAvatarChat on a stockmarket.html page, then in the /stockmarketchat/ directory settings file, you'd change "chatroom" to "stockmarket":
    <chatRoomID>stockmarket</chatRoomID>
    Or, if you put uAvatarChat on a tennis.html and a football.html page, and you wanted a general sports chat, then in the /tennischat/ and /footballchat/ directory settings files, you'd change "general" to, say, "sports":
    <chatRoomID>sports</chatRoomID>
    That way, the conversation on the tennis.html and football.html pages would be kept separate from the conversation on the stockmarket.html page.
  6. Save all uAvatarChatSettings.xml files and post each to the appropriate directory.

Running uAvatarChat and Unity 2 Multiuser Server on Different Domains
For the sake of simplicity, the web server used to retrieve uAvatarChat.swf should be on the same domain as the Unity 2 Multiuser Server. However, it is possible (but more complicated) to host uAvatarChat.swf on a different domain than the Unity 2 Multiuser Server it connects to. See Cross Domain Policy Files.