Skip to main content
Participant
November 6, 2012
Question

sharedObject.data.name

  • November 6, 2012
  • 1 reply
  • 465 views

Everytime i try to get info from shared object server side i get a error

(SERVER SIDE)

this.usernamesSO = SharedObject.get("db",true);

var m = this.usernamesSO.data.usernames  

Server gives me this error

36: TypeError: this.usernamesSO.data has no properties

????

    This topic has been closed for replies.

    1 reply

    November 6, 2012

    In main.asc, if you are trying to access this property directly in function "application.onConnect" then you will get that error because you need to set the property before accessing that. And you can use setProperty method of shared object to set the property once the connection has been established. So, try accesing the property after verifying that connection is successful and also the property is set.

    zotickAuthor
    Participant
    November 6, 2012

    Chandan its in a function and the property it is set. I can use the same code in as3 and i can pull the data but i need to pull the data server side but when i try server side i get the error.