As3 Reciving Objects

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

Moderators: Lapo, Bax

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

As3 Reciving Objects

Post by Tubutas »

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: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

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

Post by Bax »

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:

Post by Tubutas »

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: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

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
Post Reply