Hi,
This rocks.
But what if I want to just run method on SharedObject. No only change
attribute.
Imagine, that on client I have registered on SharedObject some methods,
which are invoked on each client, when server on this shared object calls
this method.
On client (sth like this)
SO:SharedObject ...
SO.fromServerMessage = function(str:Message){
trace(str);
}
On server I should call it like this:
SO.send("fromServerMessage",str);
This is on FMS. But how to make this work at Red5?
Thanks!
Tom
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Gunther Konig
Sent: Sunday, May 21, 2006 7:05 PM
To: [email protected]
Subject: Re: [Red5] SharedObject - sendMessage
On 5/21/06, Tom Krcha <[EMAIL PROTECTED]> wrote:
> Then onAppJoin
> so.sendMessage("messageFromServerToClient",listOfArguments);
> and it doesn't work . it throws an error.
>
> How can we send messages through sharedObject from server to client?
Try so.setAttribute("attrName", value);
If you want to send multiple changes at once (being notified only once
in the onSync method on client) you should put:
so.beginUpdate();
so.setAttribute("a", v);
.....
so.endUpdate();
Regards,
GK
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org