Using the storage

Use these commands to save and load user-defined data between the different SWF files of your application. For example, for the SWF file with the settings to be able to save the user-defined options and for the SWF file with the screensaver to be able to read and use them.
If you do not need different SWF files to exchange data, but you just need to save data and load them the next time the application is launched, use Local Shared Objects. Detailed information is available at the Adobe site: http://www.adobe.com/support/flash/action_scripts/local_shared_object/

Use these commands to work with the internal storage allowing you to save data and use it later. It is necessary when your application has to save some user-defined information and use it when it is started next times.
Note. All data is stored in the system registry in HKEY_CURRENT_USER/Software/Chameleon Flash/{ID}, where {ID} is the ID of the project.

Command Arguments Purpose
storage.get name, variable Gets a value from the data storage.
storage.set name, value Saves a value in the data storage.
storage.clear none Clears the storage.

storage.get

This command gets a value from the data storage. The 1st argument is the name of the value in the storage. The 2nd argument is the variable this value will be assigned to. If the value with the specified name is not found in the storage, an empty string will be assigned to the variable.

The following script takes the value of UName from the storage and assigns it to the UserName variable:

fscommand(“storage.get”, “UName,UserName”);

storage.set

This command saves the value in the data storage. The 1st argument is the name of the value in the storage. The 2nd argument is the content of the value.

The following script saves the My First Name value under the UName name in the storage:

fscommand(“storage.set”, “UName,My First Name”);

storage.clear

This command removes all values from the data storage.

fscommand(“storage.clear”);