【发布时间】:2012-11-03 20:04:18
【问题描述】:
我正在尝试使用以下代码从 adobe air 应用程序中保存和获取数据。但它只是不断提醒未定义。有人能找出错误吗?
function saveData(n, v){
var bytes = new air.ByteArray();
bytes.writeUTFBytes(v);
return air.EncryptedLocalStore.setItem(n, bytes);
}
function getData(n){
var storedValue = air.EncryptedLocalStore.getItem(n);
return air.trace(storedValue.readUTFBytes(storedValue.length));
}
saveData('item1', 'value1');
alert(getData('item1'));
【问题讨论】:
标签: actionscript-3 apache-flex air adobe