Accessibility
 
Home > Products > Flash > Support > Using ActionScript
Flash Icon Macromedia Flash Support Center - Using ActionScript
Local disk space considerations

Local shared objects are always persistent on the client, up to available memory and disk space.

By default, Macromedia Flash MXcan save locally persistent remote shared objects up to 100 K in size. When you try to save a larger object, the Macromedia Flash Player 6displays the Local Storage dialog box, which lets the user allow or deny local storage for the domain that is requesting access. Make sure your Stage size is at least 215 x 138 pixels; this is the minimum size Macromedia Flash MX requires to display the dialog box.

If the user clicks Allow, the object is saved and SharedObject.onStatus is invoked with a code property of SharedObject.Flush.Success ; if the user clicks Deny, the object is not saved and SharedObject.onStatus is invoked with a code property of SharedObject.Flush.Failed .

The user can also specify permanent local storage settings for a particular domain by right-clicking (Windows) or Control-clicking (Macintosh) while a movie is playing, choosing Settings, and then opening the Local Storage panel.

You can't use ActionScript to specify local storage settings for a user, but you can display the Local Storage panel for the user by using System.showSettings(1) . See the ActionScript Dictionary for more information.

The following list summarizes how the user's disk space choices interact with shared objects:

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 (moves the slider all the way to the right), objects are saved locally up to available disk space.
If the user selects None (moves the slider all the way to the left), all SharedObject.flush commands issued for the object return "pending" and cause Macromedia Flash MX to ask the user if additional disk space can be allotted to make room for the object, as explained above.
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 Macromedia Flash MX asks the user if additional disk space can be allotted to make room for the object, as explained above.

Additionally, if the user selects a value that is less than the amount of disk space currently being used for locally persistent data, Macromedia Flash MX warns the user that any locally saved shared objects will be deleted.

Note: There is no size limit in the Macromedia Flash Player 6 that runs from the Authoring environment; the limit applies only to the stand-alone player.

To Table of Contents Forward to next document