Ok i write an example.
There are 2 user in room.
fox1 and fox2. I'm fox1.
i send a private message.
smartFox.sendPrivateMessage("ciao",id, room);
ok it works but on event
private function onPrivateMessage(event : SFSEvent) : void {
i can know only sender i know "from" and not "to".
i test here, all users receive identic message.
fox1 send a private message.
Iis it correct ?
is there a method to know the receiver ?
privateMessage and receiver
-
gsources75
- Posts: 8
- Joined: 06 Sep 2010, 21:37
Code: Select all
smartFox.sendPrivateMessage (message, recipientId, roomId)
// message (String) : the text of the private message.
// recipientId (int) : the id of the recipient user.
// roomId (int): the id of the room from where the message is sent, in case of multi-room join (optional, default value: activeRoomId).Code: Select all
function onPrivateMessage(evt:SFSEvent):void
{
trace("User " + evt.params.sender.getName() + " sent the following private message: " + evt.params.message)
}TR