Getting the sending user of a message?

Post here your questions about the OpenSpace 1.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Post Reply
tacroy
Posts: 18
Joined: 24 Jul 2008, 14:45

Getting the sending user of a message?

Post by tacroy »

I am writing a more complex chat into our world. Private message tabs, etc. And I'm hitting a few early roadblocks.
How do I get the username from the userId? I have:

Code: Select all

public function onMessage(evt:AvatarEvent):void
		{
ta_logger.text += "["+avEvent["params"].id+ "] "+avEvent["params"].message + "\n"
}
Output being

Code: Select all

[23] This is my message
I am trying to convert the userId back to the actual username.

Thanks!
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

You already have the name of the user in the IAvatarMovieClip.avatarName property.
Paolo Bax
The SmartFoxServer Team
Post Reply