private function getLSO() :void {
so = SharedObject.getLocal("testData", "/");
var b:ByteArray = (so.data.test as ByteArray)
if(b){
b.position=0;
var o:Object = b.readObject();
test = MyClass(o);
n.text=test.name;
p.text=test.price.toString();
ta.text=test.toString();
}
else{
Alert.show("LSO testData does ot exist!");
}
}
private function setLSO():void {
so = SharedObject.getLocal("testData", "/");
var b:ByteArray = new ByteArray();
b.writeObject(test);
so.data.test=b;
so.flush();
}
http://blog.739saintlouis.com
0 megjegyzés:
Megjegyzés küldése