zone users

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

Moderators: Lapo, Bax

Murball77
Posts: 1
Joined: 06 Jun 2021, 00:49

zone users

Postby Murball77 » 06 Jun 2021, 05:01

How do I get a list of all the online zone users, I can see in the avatar chat when users connect it says 1,2,3 etc of 150 but can't figure out how it's getting that count.

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

Re: zone users

Postby Lapo » 07 Jun 2021, 07:47

Hi,
from client side it is not possible, at least not from the default API.
The main reason is that a Zone may contain tens of thousands of Users and sending the full list would be too much data.

On the server side you can access the list of users via the Zone object.
For example:

Code: Select all

Collection<User> userList = getParentZone().getUserList()


Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 7 guests