UserVariables transfer

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
AiryKai
Posts: 14
Joined: 01 Apr 2015, 08:02

UserVariables transfer

Post by AiryKai »

Hi all!

Are there ways to manage the transfer of UserVars on the server side?
I need to have the client send UserVars, but didn't get UserVars from other clients. Is this possible? And if so, in what ways?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UserVariables transfer

Post by Lapo »

Hi,
you want the client to send UserVars to the server but you don't want other users to be updated?

If that's the case UserVariables are not what you need. Instead you can send the private data to your Extension and store it in the User properties, via User.getProperty(), User.setProperty()
These values are server-side only and no one can see them from outside.

Hope it helps.
Lapo
--
gotoAndPlay()
...addicted to flash games
AiryKai
Posts: 14
Joined: 01 Apr 2015, 08:02

Re: UserVariables transfer

Post by AiryKai »

I want other users get UserVars from this client. But this client should not get UserVars from OTHER users.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UserVariables transfer

Post by Lapo »

UserVariables are values shared among all clients in the same Room.
If you need a different, specific behavior I suggest to write your own implementation on the server side. You can easily exchange data via SFSObject and implement the kind of rules you need.

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