SharedObject.mark()

http://fmsguru.com/forum/messages.cfm?threadid=B9D09A82-C160-6409-743D4D599CF927B6
I am trying to restart a pending project and it is a bit hard ;)
So I want to implement the SharedObject.mark() functionnality to synchronize several properties in a single call, but I am missing something on the client side:
Here is the example of the fms doc:


Example
The following example calls the
mark()
method twice to group two sets of shared object property updates for clients:
var myShared = SharedObject.get("foo", true);
myShared.lock();
myShared.setProperty("name", "Stephen");
myShared.setProperty("address", "Xyz lane");
myShared.setProperty("city", "SF");
myShared.mark("onAdrChange", "name");
myShared.setProperty("account", 12345);
myShared.mark("onActChange");
myShared.unlock();
The following example shows the receiving client-side script:
connection = new NetConnection();
connection.connect("rtmp://flashmediaserver/someApp");
var x = SharedObject.get( "foo", connection.uri, true);
x.connect(connection);
x.onAdrChange = function(str) {
// Shared object has been updated,
// can look at the "name", "address" and "city" now.
}
x.onActChange = function(str) {
// Shared object has been updated,
//
}

Nhận xét

Bài đăng phổ biến từ blog này

Ký tự viết tắt trong chat & email

dung lượng RAM lớn nhất mà HĐH cấu trúc 32-bit nhận được

Ubuntu LAMP Server