Strange SharedObject property error:

//1
if ( loginResult == "admin") {

var myConnectedUsersRegistry:Object = {tutoractive:"0", useractive:"0"};

fMSConnection.sharedWObject = SharedObject.getRemote("demo", 
_createfMSConnection.uri, true);
fMSConnection.sharedWObject.connect(_createfMSConn ection);

fMSConnection.sharedWObject.client=this;

fMSConnection.sharedWObject.setProperty("UsersCoun 
terRegister",myConnectedUsersRegistry);

fMSConnection.sharedWObject.data["UsersCounterRegister"]["tutoractive"] = "On";
fMSConnection.sharedWObject.setDirty("UsersCounter Register");


}
//2
if ( loginResult == "user") {

fMSConnection.sharedWObject = SharedObject.getRemote("demo", 
_createfMSConnection.uri, true);
fMSConnection.sharedWObject.connect(_createfMSConn ection);

fMSConnection.sharedWObject.client=this;

//Problematic row !
fMSConnection.sharedWObject.data["UsersCounterRegister"]["useractive"] = "On";
fMSConnection.sharedWObject.setDirty("UsersCounter Register");


}

sharedWObject is defined as public static.

First I log in as admin and create a SharedObject "demo", pass the Object to 
it's property, and update it.
Next from other client, I log in as user, and try to update already created 
SharedObject slot.
But Flash player throws an error and points to problematic row:
TypeError: Error #1010: A term is undefined and has no properties.

Why on second log in from different client I can't access a SharedObject?

Thank you in advance,
Kioshin


      
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to