Sharedobject don't remember data?
I have this code for sharedobject:
var mySharedObject = SharedObject.getLocal("republicofcode");
mySharedObject.data.clientID = my_vars.clientID;
mySharedObject.data.question = my_vars.question;
mySharedObject.data.answer = my_vars.answer;
mySharedObject.flush();
Next time when I try this code:
var mySharedObject = SharedObject.getLocal("republicofcode");
Variable mySharedObject.data.clientID is undefined. I don't know why sharedobject don开发者_开发百科't remember data?
Can you try just a basic .fla to test the SharedObject functionality?
import flash.net.SharedObject;
var so:SharedObject = SharedObject.getLocal('so');
// Run once, then comment out this next line and run again.
so.data.me = 'your special data';
trace( so.data.me );
At least we can verify if this is working or not.
精彩评论