Urgent -- Not finding sfs.login() - for separate usernames

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

Moderators: Lapo, Bax

Post Reply
deviator206
Posts: 5
Joined: 17 May 2011, 22:48

Urgent -- Not finding sfs.login() - for separate usernames

Post by deviator206 »

I am late but i have now started using smartfox2x.

I was using the earlier sfs versions for application development.
As soon as i switched to SFS2x

I m finding it difficult to have custom login
sfs1.6 - had sfs.login(Zone,UsrName, passwd)

Whereas in all latest sample of sfs2x there is use of Smartfox Bits where we have to specify the username in properties panel ...


How do i achieve the login for separate users through SFS2x

User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

You have to use an instance of the LoginRequest class, and pass it to the SmartFox.send method. Check the API documentation.
Paolo Bax
The SmartFoxServer Team
deviator206
Posts: 5
Joined: 17 May 2011, 22:48

Post by deviator206 »

Hey Thanks -
I got going with LoginRequest

But ...

zoneName - SimpleChat (which is available by default samples)
Steps followed
1) Importing SWC in flash FLA (Targeted Flash player -9, in CS4)
2) After connection success --- > sfs.send( new LoginRequest(uName, "",zoneName) );
3) sfs.send(new ExtensionRequest("add", params))



Issue
1) I am able to login even when smartfox is not up in running on my local.
I concluded the above by looking at the following traces
[SFS - INFO] Login { Message id: 1 }
{ Dump: }
(utf_string) zn: SimpleChat
(utf_string) un: s
(short) pi: 0
(sfs_array) rl:
(sfs_array)
(int) 1
(utf_string) The Lobby
(utf_string) default
(bool) false
(bool) false
(bool) false
(short) 0
(short) 150
(sfs_array)

(short) rs: 0
(int) id: 3
[SFS - INFO] Object going out:
(byte) c: 1
(short) a: 13
(sfs_object) p:
(utf_string) c: Add
(int) r: -1
(sfs_object) p:
(int) n1: 26
(int) n2: 16


2) Even if the smartfox is on - I am not able to get any logs on sfs-2x-standalone


Wanted to know if i am missing out some steps
deviator206
Posts: 5
Joined: 17 May 2011, 22:48

Post by deviator206 »

Hi ,

Lapo has answered this post the response is on following link

http://forums.smartfoxserver.com/viewtopic.php?t=11161

The issue was - SFS instals as an service and standalone as well.
though i had disconnected my standalone version my service was active coz of which i was connecting to SFS.
Post Reply