what events can you receieve, when subscribing to a group?

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

jamesr
Posts: 104
Joined: 14 Oct 2010, 14:56

what events can you receieve, when subscribing to a group?

Postby jamesr » 26 Oct 2010, 11:47

Hi,

i've checked the docs and it doesn't appear to state anywhere, the exact events you can receive (from rooms you've not joined, but that are in the same group) when subscribing to a room group? The API docs only state, 'Subscribe to the events of a Room Group' for the SubscribeRoomGroupRequest, so i'm wondering exactly which events these are?

Can you only receive,

ROOM_ADD
ROOM_REMOVE
ROOM_VARIABLES_UPDATE
USER_COUNT_CHANGE

From rooms that are within the group that you have not joined? Or is it possible to listen for,

USER_ENTER_ROOM
USER_EXIT_ROOM

for all rooms within the group once subscribed?

Cheers,

James
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 26 Oct 2010, 15:07

Events are dictated by each Room. In other words each Room is configured to fire specific events. When you subscribe to a Group of rooms you will start "watching" those Rooms and you will receive events according to each Room config.

I will make sure this is state more clearly in the docs.
Lapo
--
gotoAndPlay()
...addicted to flash games
jamesr
Posts: 104
Joined: 14 Oct 2010, 14:56

Postby jamesr » 26 Oct 2010, 15:16

Thanks Marco.

Is this set using the RoomSettings object when creating a new room? I've tried setting allowUserEnter, allowUserExit and allowUserCountChange to true. The user count works fine and a user in a group is notified by all rooms when their count changes. But the enter and exit events are only caught by a user who's currently in the same room that has been entered and exited? Not by users who are in the same group.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 26 Oct 2010, 15:23

Of course, that is the way it is meant to be.
Those events are received inside the Room, not outside of it.
Lapo

--

gotoAndPlay()

...addicted to flash games
jamesr
Posts: 104
Joined: 14 Oct 2010, 14:56

Postby jamesr » 26 Oct 2010, 16:00

i think it's definitely worth clarifying in the docs, which events are room specific and which can be received within a group.

Thanks again for your help.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 26 Oct 2010, 18:28

Yeah, we're just out of the private beta where developers where already familiar with these concepts from SFS 1.x

We're now gradually adding more articles in the new 2X docs that go back to the SFS 1.x basics and clarify these essential concepts.

It's also quite simple: Room events are all received by users joined in the Room. The only exception is the USER_COUNT event which updates everyone.
Lapo

--

gotoAndPlay()

...addicted to flash games
jamesr
Posts: 104
Joined: 14 Oct 2010, 14:56

Postby jamesr » 26 Oct 2010, 19:21

Thanks Marco

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 46 guests