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. |
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”);
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”);
This command removes all values from the data storage.
fscommand(“storage.clear”);
All rights reserved © 2007 ChameleonFlash.com