Sending Object

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

Moderators: Lapo, Bax

Post Reply
ParkerJ
Posts: 30
Joined: 31 Aug 2009, 23:14

Sending Object

Post by ParkerJ »

Code: Select all

[Sending]: <msg t='sys'><body action='asObj' r='4'><![CDATA[<dataObj><var n='skill' t='s'>1</var></dataObj>]]></body></msg>
It sends the message but on the reciving code;

There is no output that says

[Recieved]:

I have checked this code;

Code: Select all

_parent.smartfox.onObjectReceived = function(obj, user){
      	trace(obj + " <= OBJECT  " + user + "<= Commited By!");
}
The _parent. is because the code is within a movieclip.

But still nothing.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

An object is sent to all the other users in the Room except the sender itself. You should test with two clients at least.
Also you could take a look at the sendObjectToGroup() method if you need to specify exactly which clients should receive the data.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
ParkerJ
Posts: 30
Joined: 31 Aug 2009, 23:14

So It sends

Post by ParkerJ »

So its send's to others not self.

~Parker
Post Reply