How to access in a zone?

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

Moderators: Lapo, Bax

TwineApps
Posts: 80
Joined: 10 Nov 2016, 18:39

How to access in a zone?

Postby TwineApps » 22 Feb 2017, 15:08

I make these steps:

1) Connect to SmartFox
2) Login to the "Login" zone
3) Now I want to access the "Lobby" zone, as I can do it?

I think I have to call "sfs.Send (new LogoutRequest ());"

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

Re: How to access in a zone?

Postby Lapo » 22 Feb 2017, 15:36

1. Send a LogoutRequest
2. Wait for the SFSEvent.LOGOUT on the client side
3. Send a LoginRequest with "Lobby" as the zone parameter
Lapo
--
gotoAndPlay()
...addicted to flash games
TwineApps
Posts: 80
Joined: 10 Nov 2016, 18:39

Re: How to access in a zone?

Postby TwineApps » 22 Feb 2017, 16:11

When I do LoginRequest, I must re-enter the username and password of the user and check if they are valid?

sfs.Send (new LoginRequest (userName, UserPass, "Lobby"));

or

sfs.Send (new LoginRequest ("", "", "Lobby"));
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to access in a zone?

Postby Lapo » 22 Feb 2017, 16:43

Yes, if you care about security :)
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Baidu [Spider] and 158 guests