heppa
10-15-2009, 07:13 AM
Hi guys,
I recently started on AS3 and I have a strange issue with Shared Objects that I can't figure out.
Take this simple code:
import flash.net.SharedObject;
var so:SharedObject = SharedObject.getLocal("userDataAS3");
so.data.username= "user1377";
so.flush();
It creates the shared object like this (viewed with SOL editor):
http://www.cpguru.com/demonstrations/cookieAS3.jpg
The format looks all screwed up. It doesnt matter if I define the value as String, Number or anything else. It always appears like this in the Shared Object. When it's like this I can't access the value.
If I create the exact same thing in AS2:
var so:SharedObject = SharedObject.getLocal("userDataAS2");
so.data.username= "user1377";
so.flush();
http://www.cpguru.com/demonstrations/cookieAS2.jpg
Here the shared object looks nice and tidy and I can access the value without any problems.
Can anyone explain to me what is happening and why the AS3 version is "garbled"?
Thanks in advance.
/Michael
I recently started on AS3 and I have a strange issue with Shared Objects that I can't figure out.
Take this simple code:
import flash.net.SharedObject;
var so:SharedObject = SharedObject.getLocal("userDataAS3");
so.data.username= "user1377";
so.flush();
It creates the shared object like this (viewed with SOL editor):
http://www.cpguru.com/demonstrations/cookieAS3.jpg
The format looks all screwed up. It doesnt matter if I define the value as String, Number or anything else. It always appears like this in the Shared Object. When it's like this I can't access the value.
If I create the exact same thing in AS2:
var so:SharedObject = SharedObject.getLocal("userDataAS2");
so.data.username= "user1377";
so.flush();
http://www.cpguru.com/demonstrations/cookieAS2.jpg
Here the shared object looks nice and tidy and I can access the value without any problems.
Can anyone explain to me what is happening and why the AS3 version is "garbled"?
Thanks in advance.
/Michael