Skip to main content
Inspiring
October 2, 2006
Question

remote shared object problem

i've created the following remote shared object below but for some reason the remote shared object doesn't show up in the media server admin console nor am i able to save any data to the remote shared object and then retrieve it ...could somebody
plz show me how to write a simple remote shared object which stores a value and then displays the stored value in a dynamic text field?The stored value also needs to synchronize.




//
/* The URI for the shared object must be the same as
the URI of the NetConnection it's using. */


function initRSO(){
//create shared object
var my_rso:SharedObject = SharedObject.getRemote("SO", my_nc.uri, false);

//sync data stored in shared object.
my_rso.onSync = function(list) {

}
//connect to remote shared object
my_rso.connect(my_nc);
}
//check to see if connected with a callback.
my_nc = new NetConnection();
my_nc.onStatus = function(info){
if (info.code == "NetConnection.Connect.Success"){
initRSO();

}else{
error.text = "cannot connect";
}
};
//connect to server

my_nc.connect("rtmp:/RSO");
///////////////////////////////////////////////////////////////////////////////
//store variable in shared object
my_rso.data.test = "6";
trace("variable is:" + my_rso.data.test);



//dispaly data
msg.text = my_rso.data.test;
/////////////////////////////////////////////////////
    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    October 3, 2006
    You need to create the SO on the server side. If you don't, the client has nothing to sync to.

    In your SSAS:

    my_so = SharedObject.get("SO", false);
    Translate