shared object with complex values
My remote shared object on the server was created like this...
var userList = new Array();
application.onAppStart = function(){
this.usersSO = SharedObject.get("userList", false);
}
then on connect I create a new object and put that into the so-list
application.onConnect = function(client, user){
application.acceptConnection(client);
var newUser = new Object();
newUser.userName = user.userName;
newUser.userID = user.userID;
newUser.userStatus = user.userStatus;
this.usersSO.setProperty(user.userID, newUser);
}
I can clear the user:
this.usersSO.setProperty(client.userID, null);
but how do I set a value like
userStatus
when it is inside a object refered to by the so name-id
setProperty(userID, simpleValue);
if I added simple values like
this.usersSO.setProperty('simpleName', "nameABC");
then I could
setProperty('simpleName', "nameNEW");
- is the only way to call a script on the server and set the original userList reference of the user adn then send a call with update function to all connected clients???
thanks
