Page 1 of 1

OnPublicMessage different rooms

Posted: 28 Aug 2011, 18:30
by matrix211v1
Hello All!

Quick question. Using SFS 1.5.5 and the API 1.2.6 I am in RoomID 1 and I want to send a PublicMessage to everyone who is in RoomID2. Both rooms exist and have people in it. I am calling:

smartFoxClient.SendPublicMessage("Hello Everyone", 2);

The OnPublicMessage Event doesn't fire. I am wondering a couple of things because the OnPublicMessage works if I send it to RoomID (which defaults to the activeRoomId) 1 such as:

smartFoxClient.SendPublicMessage("Hello Everyone");

Do you have to be logged into RoomID 2 for this to work? If so, how to I multi-join two rooms at the same time?
Else, do you have any other suggestions I need to look into?

Thanks!

Posted: 07 Sep 2011, 11:12
by ThomasLund
Hey James,

Hmmm - I cant remember if you need to be logged in to the room or not.

But you can join multiple rooms easily by passing a true to the dontLeave parameter in joinRoom.

E.g.:

smartFox.joinRoom(15, "", false, true)

This allows for being in multiple rooms at the same time.

Hope that helps

/Thomas