国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > WEB開發 > 正文

17.5.刪除共享對象中的數據

2024-04-27 13:52:24
字體:
來源:轉載
供稿:網友
17.5.1. 問題
我想要從磁盤上清除一個共享對象或者從一個共享對象中刪除數據的一個指定位置。
17.5.2. 解決辦法
使用clear()方法來清除一個共享對象。使用delete 關鍵字來移出一個共享對象的data 屬性中的制定數據。
17.5.3. 討論
你需要簡單的呼叫一個SharedObject 的clear()方法來從你的文件系統中清除這個共享對象。
+展開
-ActionScript
// create an lso
private var lso : SharedObject = getLocal( "myLso" );
// create some sample data
private var sampleData : String = "data";
//assign some data to the lso
lso.data.sampleData = sampleData;
//flush to the file system
lso.flush();
//check the lso value
trace( lso.data.sampleData );
// delete the lso
lso.clear();
// should be "undefined"
trace( lso.data.sampleData );

使用delete 關鍵字來刪除本地共享對象(lso)中的一個指定數據元素,但是注意,這個不能把共享對象從文件系統中清除。
+展開
-ActionScript
// delete sampleData
delete lso.data.sampleData;
// trace( lso.data.sampleData )
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 连城县| 纳雍县| 缙云县| 池州市| 荆门市| 浦东新区| 正宁县| 平顶山市| 永嘉县| 博湖县| 军事| 靖宇县| 绥阳县| 北辰区| 三原县| 张掖市| 大关县| 揭阳市| 襄城县| 化隆| 全南县| 百色市| 柏乡县| 枣庄市| 板桥市| 普兰店市| 沅陵县| 贡觉县| 巴青县| 昭平县| 微山县| 襄樊市| 镇赉县| 卓尼县| 达州市| 厦门市| 炉霍县| 大关县| 崇州市| 大新县| 南召县|