本地存储问题-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 [email protected]. 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如果你想参与那么可以联系他[email protected],在这里可以讨论很多FLASH底层的东西
  Ted :)
本文转自
http://api.onflex.org/2007/10/flashnetsharedobject.html

你可能感兴趣的:(Flex,Flash,Adobe,AIR,Exchange)