Section 17.0. Introduction


17.0. Introduction

Much of the data you work with in ActionScript is stored in memory while the movie is executing. When the movie is closed, the memory is released and the data is no longer available. What if you want to be able to store data between different visits to the movie? Or what if you want to be able to share data between movies running on the same client? To accomplish these feats, you'll need to look at how you can store data outside of the Flash Player.

In ActionScript, the SharedObject class lets you to implement persistence on the client machine. There are two types of shared objects that can be created: local and remote. This chapter focuses solely on local shared objects (LSOs).

Local shared objects are similar to browser cookies in that they are stored on the client's machine. LSOs are useful for storing the same kind of information for which cookies have traditionally been used, such as the ability for a web site to remember a user so that the user does not have to manually login during each visit. However, LSOs are more powerful than cookies because, by default, they never expire, they can store more data than cookies, they aren't transmitted between the client and server, and they can store native ActionScript datatypes. In contrast to remote shared objects (RSOs), LSOs are available to use without any additional software involved on either the client or server.




ActionScript 3. 0 Cookbook
ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application Developers
ISBN: 0596526954
EAN: 2147483647
Year: 2007
Pages: 351

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net