116
Client-Side ActionScript Language Reference
The following list summarizes how the user’s disk space choices interact with remote shared
objects from a specified domain that request local persistence:
■
If the user selects Never, objects are never saved locally, and all
SharedObject.flush()
commands issued for the object return
false
.
■
If the user selects Unlimited (by moving the slider all the way to the right), objects are
saved locally up to available disk space.
■
If the user selects None (by moving the slider all the way to the left), all
SharedObject.flush()
commands issued for the object return
"pending"
and cause
Flash to ask the user if additional disk space can be allotted to make room for the object.
■
If the user selects 10 KB, 100 KB, 1 MB, or 10 MB, objects are saved locally and
SharedObject.flush()
returns
true
if the object fits within the specified amount of
space. If more space is needed,
SharedObject.flush()
returns
"pending"
, and Flash
asks the user if additional disk space can be allotted to make room for the object.
Additionally, if the user selects a value that is less than the amount of disk space currently
being used for locally persistent data, Flash warns the user that any shared objects that have
already been saved locally will be deleted.
Method summary for the SharedObject class
NO
TE
There is no size limit when Flash Player runs from the authoring environment; the limit
applies only to the stand-alone player.
Method
Description
SharedObject.clear()
Purges all the data from the shared object and deletes the
shared object from the disk.
SharedObject.close()
Closes the connection between a remote shared object and
the Flash Media Server.
SharedObject.connect()
Connects to a remote shared object on the Flash Media
Server.
SharedObject.flush()
Immediately writes a locally persistent shared object to a local
file.
SharedObject.getLocal()
Returns a reference to a locally persistent shared object that is
available only to the current client.
SharedObject.getRemote()
Returns a reference to a shared object that is available to
multiple clients by means of the Flash Media Server.
SharedObject.getSize()
Gets the current size of the shared object, in bytes.