本地存储问题-BY TED

 

使用FLASH的API可以在客户端存储资料和COOKIE有点类似,最多能够存储到100K的东西,参看下面的示例
  API DOCUMENTATION
  EXAMPLE:
  var so:SharedObject = SharedObject.getLocal("scores");
  so.data.highScore = new Number(892343);
  so.data.lowScore = new Number(5934);
  so.data.recentScore = new Number(382234);
  so.data.gamerName = new String("adobeted");
  so.flush();
  MORE:
你可以使用GETLOCAL方法获得通过一个URL获得特定的对象,当然取得和设置的URL DOMAIN必须一致(安全需求)
  Once you have a SharedObject instance you simply write data into the dataobject. When the Flash Player/AIR instance quits all SharedObject data is flushed to disk but you can force writing to disk using the flush()method.

需要保存数据就将其写入对象的DATA成员即可,用FLUSH()方法将其强制输出到磁盘
  SharedObject data can also be synchronized using the RTMP protocol and are the primary data exchange technique for use with Flash Communication Server.
  USES:
  - Tracking users with a GUID
  - Persisting username for login fields
  - Storing UI state
  - Storing history for local user
  - Synchronizing data between clients (FMS via RTMP)
  - Store any data between requests
  Hidden APIS
  I am firing up the "Hidden API" Blog. If you are interested in contributing to Hidden APIS, please contact me at ted@adobe.com. I am looking for various opinions on the different APIS as my perspective is far from the only one that matters. I think we can all learn a ton about the lower level features of Flash Player/AIR/Flex/Flash here sharing how the various APIS are used. Hidden APIS should be a fun long term project and now that I have time, lets get this party started.
  Cheers,

TED正在开发一个隐藏API"Hidden API"的BLOG如果你想参与那么可以联系他ted@adobe.com,在这里可以讨论很多FLASH底层的东西
  Ted :) 
        本文转自
http://api.onflex.org/2007/10/flashnetsharedobject.html

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值