Skip to main content
December 18, 2007
Question

Remote SharedObject Parse Realtime

  • December 18, 2007
  • 1 reply
  • 197 views
I'm trying to have the sharedobject textfield value in my swf (username) update the shared object on the fms itself constantly. This is the code I have so far, it only works until i type something but it doesnt update. I'm checking the SharedObjects pane in FMS admin to debug, I only see the value I set at the beginning.

The purpose of doing this is because Im trying to reflect a value i have in realtime over and over, like seconds on a clock but its reading the value locally. Any help greatly appreciated. Here's the code.
quote:


// start
var username:TextField;

var my_nc:NetConnection = new NetConnection();

my_nc.connect("rtmp://myhost.com/test");
var myRemote_so = SharedObject.getRemote("mo", my_nc.uri, false);
myRemote_so.connect(my_nc);
myRemote_so.onSync = function(list) {

for (var k in list) {
trace("name = "+ list.name + ", event = " + list.code);
}
myRemote_so.data.username = username.text;


}
// end

    This topic has been closed for replies.

    1 reply

    December 19, 2007
    Any suggestions on this one would help. Thanks!