Flex中的ShareObject类似于传统的cookie,但又具有传统cookies所不具有的优点:
1.默认情况下,不会过期
2.默认情况下,每个ShareObject的大小限制为100KB;
3.可以存储简单数据类型 :String,Array,Data等;
4.存储于程序制定的位置[在User的Home Directory中];
5.从不在客户端与服务器间传递
var NoteManagementShareObject:SharedObject = SharedObject.getLocal("NoteManagementShareObjectSave");
var NoteManagementShareObject:SharedObject = SharedObject.getLocal("NoteManagementShareObjectSave", "/");
以保存XML数据为例:
public function save(givenXML:XML = null):void{ var NoteManagementShareObject:SharedObject = SharedObject.getLocal("NoteManagementShareObjectSave"); NoteManagementShareObject.data.catandnote = givenXML; NoteManagementShareObject.flush(); }
ButtonBar,LinkBar组件简单应用 <->
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.