Forum has no search? + onLogin event issue

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

Moderators: Lapo, Bax

didibus
Posts: 34
Joined: 09 Sep 2007, 19:31

Forum has no search? + onLogin event issue

Postby didibus » 05 Nov 2007, 04:18

Hi,

First, I'm just wondering does the forum has a search feature, because I didn't find it? If it does not, I think it should.

Now my real problem:

So I decided to build a connection class that would handle all of the smartFoxServer commands needed to establish a connection, a login and a join or change room. Unfortunately, the SFSEvent onLogin causes me a lot of troubles, because it returns nothing, so when I try to access evt.params.resObj it gives me this error:

Code: Select all

TypeError: Error #1010: A term is undefined and has no properties.
   at Connector/::onLogin()
   at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at it.gotoandplay.smartfoxserver.handlers::SysHandler/handleLoginOk()
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at it.gotoandplay.smartfoxserver.handlers::SysHandler/handleMessage()
   at it.gotoandplay.smartfoxserver::SmartFoxClient/::xmlReceived()
   at it.gotoandplay.smartfoxserver::SmartFoxClient/::handleMessage()
   at it.gotoandplay.smartfoxserver::SmartFoxClient/::handleSocketData()


The way I made my Connector class is I give it a reference to the sfs object, then I simply make a method for every thing required by smartFox to connect, login and join rooms including it's events. The other events work fine, but onLogin doesn't return anything, anyone can help me?

It doesn't work even when I put the event on my document class. So, maybe it's actually the document class which causes the problem, because it's the first time I use SmartFox with a Flash AS3 project that uses the document class feature of CS3.

Thank You
didibus
Posts: 34
Joined: 09 Sep 2007, 19:31

Postby didibus » 05 Nov 2007, 04:28

OMG, just 2 seconds after I post this, I find the problem.

Well, after 1 week trying to debug this, it's a documentation typo. The Smart Fox AS3 api reference states that onLogin has a resObj but it doesn't, the returned values are all directly inside the params object, lol, the funny thing is I had fixed that when I was using smartFox without this new class of mine, I just totally forgot about it. I'll report this in the bug trap.

P.S.: my search question still stands.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 05 Nov 2007, 06:59

The search is right below the main menu...
Where it reads... FAQ Search Memberlist ...

thanks for reporting the error in the doc, we'll release a new (and better looking) AS3 documentation pretty soon.
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 96 guests