I am trying to implement Shared Object as I have before but cannot retrieve the
SO data.
// Declared like so......
public var adminSO:SharedObject;
// in my doInit() function , assigned like so.......
adminSO = SharedObject.getLocal("siAdminSO");
I have a Model - "adminInfo" like so.......
<mx:Model id="adminInfo">
<info>
<userName/>
<userPriv/>
</info>
</mx:Model>
I populate the model above following a successful login and then store the same
in a Shared Object using the AS below
public function saveUserPref():void{
for( var o:String in adminInfo){
adminSO.data[o] = adminInfo[o]
trace(adminSO.data[o]) // returns userName as expected
trace(adminInfo[o]) // returns userName as expected
}
var sv = adminSO.flush()
trace(sv) // returns "flushed"
}
Then next time the user logs in I have this AS to retrieve the SO data which
produces
[object Object]=undefined for each item in the SO
if(adminSO.size >0 && adminSO.data){
trace(adminSO.size) // returns 59
for each(var o:String in adminSO.data){
trace(o+'='+adminSO.data[o]) // returns
[object Object]=undefined
}
}
What am I missing here ? - this same method has worked great in another
project....
Thanks
--
Ben Marchbanks
::: magazooms :::
digital publishers, taking print beyond paper......
http://www.magazooms.com
Greenville, SC
864.284.9918