As3 Reciving Objects

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

Moderators: Lapo, Bax

Tubutas
Posts: 4
Joined: 27 Jul 2009, 01:28
Contact:

As3 Reciving Objects

Postby Tubutas » 28 Jul 2009, 02:43

Code: Select all

var smartfox:SmartFoxClient = new SmartFoxClient();
smartfox.connect("localhost",9339);
smartfox.login("simpleChat",null,null);
smartfox.joinRoom(1);
//this is called in later after im sure the room has been joined and all that
smartfox.sendObject({x:10,y:20})

smartfox.addEventListener(SFSEvent.onObjectReceived,handleObjectReceived);

function handleObjectReceived(event:SFSEvent):void{
   trace("RECIEVED AND OBJ!");
}


Doesn't seem to work... I can send public messages and everything fine, but sending objs is not working at all.
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 28 Jul 2009, 07:07

Please post messages in the right forum!
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 28 Jul 2009, 07:10

While public messages are sent to all users including the sender, object sent through the sendObject method aren't received back by the sender. So you will need to have two clients connected in order to test this feature.
Paolo Bax
The SmartFoxServer Team
Tubutas
Posts: 4
Joined: 27 Jul 2009, 01:28
Contact:

Postby Tubutas » 28 Jul 2009, 09:38

Even though this was in the wrong section...

Thanks alot!

Also on a side note What would be the correct forum?
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 28 Jul 2009, 10:27

The current forum (SmartFoxServer Discussions and Help); before we moved it, you posted your topic in the RedBox support forum.
Paolo Bax
The SmartFoxServer Team

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: Google [Bot] and 58 guests