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