Adding custom code in SFS client side API

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
Rohit Sharma
Posts: 31
Joined: 05 Nov 2008, 05:27
Location: Delhi,India
Contact:

Adding custom code in SFS client side API

Post by Rohit Sharma »

Hi,

Inside onUserLeaveRoom event currently we only receive userName, userId and roomId. Since its a client side code and we dont need to interact with server, is there a reason for not sending the complete user object?

In my application, I am performing some action on user leaving which depends on uservariable value. Since the user variable is not available by default with this event, I am thinking of adding this variable to the params
object inside Syshandler.as .
Do you recommend using this approach?

Thanks,
Rohit
Rohit Sharma,
Lead Developer and Co-Founder,
Mactabilis Arts.
www.mactabilisarts.com
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Sure, you can modify it if you need it.
Otherwise you can keep references to users in your code and avoid to modify the API.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply