EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 619

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SharedObject.data 619
Constructor for the SharedObject class
For information on creating local shared objects, see
SharedObject.getLocal().
SharedObject.clear()
Availability
Flash Player 7.
Usage
my_so.clear()
Parameters
None.
Returns
Nothing.
Description
Method; purges all of the data from the shared object and deletes the shared object from the disk.
The reference to
my_so is still active, and my_so is now empty.
SharedObject.data
Availability
Flash Player 6.
Usage
myLocalSharedObject.data
Description
Read-only property; the collection of attributes assigned to the data property of the object; these
attributes can be shared and/or stored. Each attribute can be an object of any of the basic
ActionScript or JavaScript types—Array, Number, Boolean, and so on. For example, the
following lines assign values to various aspects of a shared object:
itemsArray = new Array(101,346,483);
currentUserIsAdmin = true;
currentUserName = "Ramona";
so.data.itemNumbers = itemsArray;
so.data.adminPrivileges = currentUserIsAdmin;
so.data.userName = currentUserName;
All attributes of a shared objects data property are saved if the object is persistent.
Note: Do not assign values directly to the data property of a shared object, as in
so.data = someValue; Flash ignores these assignments.
To delete attributes for local shared objects, use code like delete so.data.attributeName;
setting an attribute to
null or undefined for a local shared object does not delete the attribute.

Table of Contents

Related product manuals