O'Reilly logo

Flash Multiplayer Virtual Worlds by Makzan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required