(Pro edition only)
These commands are used for working with the license manager. You can use them to receive information and perform operations necessary to register a user. All commands from this section (except for license.keyCustom) are used in the standard window reminding about the registration. The reminder.fla file of this window is stored in the FLA\Reminder subdirectory of the directory where Chameleon Flash is installed. Use it as an example.
| Command | Arguments | Purpose |
| license.keyResult | variable | Returns the status of the user's key. |
| license.keyCustom | variable | Returns the string with the custom key data. |
| license.registeredTo | variable | Returns the name of the registered user. |
| license.HWID | variable | Returns the Hardware ID of the current system. |
| license.trialType | variable | Returns the limitation type. |
| license.trialLimit | variable | Returns the number of trial days/launches. |
| license.trialLeft | variable | Returns the number of remaining days/launches. |
| license.enterKey | name, key, variable | Enters the license key. |
| license.enterKeyFile | name, key file, variable | Enters the license key from a file. |
| license.registerURL | variable | Returns the registration page URL. |
| license.launchApp | none | Restarts the startup SWF file. |
This command returns the status of the key from the
moment of the last check. The argument is the variable the status of
the key will be assigned to. The key status can take the following values:
0 – no key is entered (empty name or key)
1 – invalid key
2 – valid key
3 – valid key. Expired.
The following script assigns the status of the key to the varKeyResult.
fscommand(“license.keyResult”, “varKeyResult”);
This command returns the custom string from the entered license key. The argument is the variable the string will be assigned to.
The following script assigns the custom string to the varKeyCustom.
fscommand(“license.keyCustom”, “varKeyCustom”);
This command returns the name of the registered user. The command returns an empty string for unregistered users. The argument is the variable the name will be assigned to.
The following script assigns the name of the registered user to the varRegisteredTo.
fscommand(“license.registeredTo”, “varRegisteredTo”);
This command returns the Hardware ID of the system the application is running on. The command returns an empty string if the “Hardware-locked keys” option is disabled. The argument is the variable the Hardware ID will be assigned to.
The following script assigns the Hardware ID to the varHWID.
fscommand(“license.HWID”, “varHWID”);
This command returns the identifier of the limitation
type set in the application. The argument is the variable the type ID
will be assigned to. The ID can take the following values:
0 – Limited access to files
1 – Limited number of days
2 – Limited number of launches
The following script assigns the limitation type to the varTrialType.
fscommand(“license.trialType”, “varTrialType”);
If the limitation type is 1 or 2, this command returns the number of days/launches set for unregistered users. The argument is the variable the number of days/launches will be assigned to.
The following script assigns the number of days/launches to the varTrialLimit.
fscommand(“license.trialLimit”, “varTrialLimit”);
If the limitation type is 1 or 2, this command returns the number of remaining days/launches for an unregistered user. The argument is the variable the number of remaining days/launches will be assigned to.
The following script assigns the number of remaining days/launches to the varTrialLeft.
fscommand(“license.trialLeft”, “varTrialLeft”);
This command checks and enters the license key. The
1st argument is the username. The 2nd argument is the license key. The
3rd argument is the variable the result of the key check will be assigned
to (the result is the same as that for license.keyResult). If the key
is entered correctly, the application remembers it and uses it in future
launches. The application stops using the stored key in the following
cases:
- the key has a time limitation and the period has expired.
- the key
is locked to the system and the Hardware ID has changed.
The following script checks the username/license key specified in the regName/regKey variables and notifies the varKeyResult variable about the result of the key check.
fscommand(“license.enterKey”, regName+“,"+regKey+",varKeyResult”);
This command does the same as enterKey, the only difference is that it takes the key from the file specified in the 2nd argument.
The following script checks the username specified in the regName variable with the license key stored in the file specified in the regKeyFile variable and notifies the varKeyResult variable about the result of the key check.
fscommand(“license.enterKeyFile”, regName+“,"+regKeyFile+",varKeyResult”);
This command returns the URL of the page containing information about the registration of the product. This URL is specified in the project settings. The argument is the variable the URL of the specified registration page will be assigned to.
The following script assigns the URL of the registration page to the varRegisterURL.
fscommand(“license.registerURL”, “varRegisterURL”);
This command opens the startup SWF file of the application again. It is used in the reminder screen for continuing using the program.
The following script will re-open the startup SWF file.
fscommand(“license.launchApp”);
All rights reserved © 2007 ChameleonFlash.com