problem with connection

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

Moderators: Lapo, Bax

Post Reply
slayerzphb
Posts: 9
Joined: 15 Jan 2010, 21:02

problem with connection

Post by slayerzphb »

Version: SFS Basic with the latest patch and latest apis

Debug:
[Sending]: <msg t='sys'><body action='verChk' r='0'><ver v='153' /></body></msg>

[Received]: <cross-domain-policy><allow-access-from domain="*" to-ports="9339" /></cross-domain-policy>
[Received]: <msg t="sys"><body action="apiOK" r="0" /></msg>

So...later this... i don't recieve any message...
the sfs tris example run normally for example...
but my game...see my codes...

Part of the code:
_root.zoneGame = "mygamezone";
_root.sfcl = new SFCl(username, ip, port, true, _root.zoneGame);
---------------------------------------------------------------------

Part of my class SFCl.as:
class SFCl extends it.gotoandplay.smartfoxserver.SmartFoxClient
{
static var zone;
function SFCl(username, ip, port, debug, z)
{
super();
this.debug = debug;
this.username = username;
this.ip = ip;
this.port = port;
zone = z;
this.connect(ip, port);

function onObjectReceived(obj, sender)
{
------------------------------------------------

*The api is appointed correctly to the classpath of sfs basic/flash api/actionscript 2...
-----------------------------------------------------------------

Anybody Can Help me?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

What does your onConnection handler do?
Lapo
--
gotoAndPlay()
...addicted to flash games
slayerzphb
Posts: 9
Joined: 15 Jan 2010, 21:02

onconnection handler

Post by slayerzphb »

Lapo wrote:What does your onConnection handler do?

function onConnection(success)
{
_global.currentRoom = undefined;
if (success)
{
this.login(SFCl.zone, username);
}
else
{
var errorwind = _root.showWindow("errorWindow");
errorwind.errorMsg.text = "Error. Try again later.";
} // end else if
}


----------------------
i tried too:
function onConnectionHandler(success:Boolean):Void
function onConnectionHandler(success)
-----------------------------
i tried this.onConnection = handleConnection (in part of my class)
and function handleConnection(success:Boolean)
( equal example of sfs tris)
but
any message...
don't happen nothing!
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Ok, veeery confusing. :)
I would suggest that you start with one of our examples, like the SimpleChat and verify that it works. Those examples are meant to work out of the box.
Let us know.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply