Let's assume your array is saved in an SO property named "myArray" On the client side myArray = my_so.data.myArray; or myVar = my_so.data.myArray[x]; on the server side: myArray = my_so.getProperty("myArray"); myVar = myArray[x];
well that doesn't work....here is how i attempt to access the array using the method you mentioned below.....SO.data.slot0.theTime[0]; ........but that always traces as undefined but if i trace....... SO.data.slot0; .....then the array displays just fine but i can't access its data.
here is the code i'm attempting to use. client_nc = new NetConnection(); client_nc.onStatus = function(info) { trace("Level: " + info.level + newline + "Code: " + info.code); } client_nc.connect("rtmp:/RSO"); SO = SharedObject.getRemote("data0", client_nc.uri, false); SO.connect(client_nc); SO.onSync = function(list) { for ( var i = 0; i < list.length; i++ ) if ( list[i].name == "slot0" && list[i].code != "success") { array0 = SO.data.slot0; break; } }; //start timer start_btn.onPress = addarray; function addarray() { SO.data.slot0 = array0; slot0.text = SO.data.slot0; access.text = SO.data.slot0.array0[0]; } var array0 = new Array(); var minsxxx = 1; var secsxxx = 2; array0[0] = minsxxx; array0[1] = secsxxx;
I fixed it I fixed it.........for some reason 1 slot of the stored array was in .....SO.data.slot[0]....and the other slot of the stored array was in SO.data.slot[1].....i'm a little baffled so i'll just call this unkown work around.
slot0 is the name of the slot in the remote shared object i wish to use...in case i want to store somthing else in slot1 or slot2 or whatever a remote shared object is similar to an array in the way it stores information.....in my case a slot in an array storing an array.
Don't see what you're looking for? Try a search.
|