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

首頁 > 網(wǎng)站 > WEB開發(fā) > 正文

17.5.刪除共享對象中的數(shù)據(jù)

2024-04-27 13:52:24
字體:
供稿:網(wǎng)友
17.5.1. 問題
我想要從磁盤上清除一個共享對象或者從一個共享對象中刪除數(shù)據(jù)的一個指定位置。
17.5.2. 解決辦法
使用clear()方法來清除一個共享對象。使用delete 關(guān)鍵字來移出一個共享對象的data 屬性中的制定數(shù)據(jù)。
17.5.3. 討論
你需要簡單的呼叫一個SharedObject 的clear()方法來從你的文件系統(tǒng)中清除這個共享對象。
+展開
-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 關(guān)鍵字來刪除本地共享對象(lso)中的一個指定數(shù)據(jù)元素,但是注意,這個不能把共享對象從文件系統(tǒng)中清除。
+展開
-ActionScript
// delete sampleData
delete lso.data.sampleData;
// trace( lso.data.sampleData )
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 凤台县| 石棉县| 墨江| 会宁县| 龙陵县| 华坪县| 高台县| 北海市| 博罗县| 佛山市| 松阳县| 政和县| 鹰潭市| 永定县| 凉山| 崇礼县| 普陀区| 茂名市| 鄱阳县| 盐津县| 南和县| 龙陵县| 太谷县| 达州市| 蛟河市| 揭阳市| 玛纳斯县| 浦县| 南丹县| 宜昌市| 谢通门县| 苏尼特右旗| 宕昌县| 司法| 诸城市| 晋州市| 万安县| 泾源县| 绍兴市| 黄冈市| 个旧市|