Sending private messages

A common use of buddy list is sending private messages to buddies. In some cases, we may be playing a game in virtual world and want to ask whether my friend wants to join it. We can open up the buddy list within the game and send a private message out. We are going to implement it by using the built-in private message feature.

We added a private message button in the info panel. A private message panel prompts out when we click on the button. After the player inputs some text and clicks on send, we construct the private message in a format to include the recipient's name. We need the recipient's name to display in the chat dialog panel. The chat message is composed in following format:

Sender|recipient|private message ...

Get Flash Multiplayer Virtual Worlds now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.