In order to login using the usernames and passwords of players, there is a function for onExtentionResponce. This is where I think the problem is because when your not using accounts, it wont use that part. Here is the onExtentionResponce part:
Code: Select all
//----------------------------------------------------------
// The server must handle an extention response
//----------------------------------------------------------
smartfox.onExtensionResponse = function(resObj:Object) {
if (resObj._cmd == "logOK") {
// Login Success Example Code
gotoAndPlay("chat")
smartfox.joinRoom("The Hall")
_global.myName = resObj.name
} else if (resObj._cmd == "logKO") {
// Login failed example code
_global.isBusy = true
_root.status_txt.text = "Something has gone wrong. Please refresh the page and try logging in again.";
redoLogin();
}
}
Code: Select all
[Sending]: <msg t='sys'><body action='verChk' r='0'><ver v='140' /></body></msg>
[Received]: <cross-domain-policy><allow-access-from domain="*" to-ports="9349" /></cross-domain-policy>
[Received]: <msg t="sys"><body action="apiOK" r="0" /></msg>
[Sending]: <msg t='sys'><body action='login' r='0'><login z='Island of Turtles'><nick><![CDATA[Billybob]]></nick><pword><![CDATA[********]]></pword></login></body></msg>
[Received]: <msg t="xt"><body action="xtRes" r="-1"><dataObj><var n='err' t='s'></var><var n='_cmd' t='s'>logOK</var></dataObj></body></msg>
SmartFoxError: requested room to join does not exist!
[Sending]: <msg t='sys'><body action='loadB' r='-1'></body></msg>
[Received]: <msg t="sys"><body action="bList" r="-1"><bList /></body></msg>