there is no straightforward way to do it in any programming language. I'm currently developing a Director-specific trial version solution, but it's not ready yet for general/commercial use. Are you looking for a free solution or are you willing to pay?

Trial Versions are used so users can try out your software and then buy it if the software is something they want. So, there are two parts to trial software;

1. the code that handles the trial version

2. the code that handles the product serial and registration/licence keys

The code that handles the trial version needs to be able to do these things:

1. Keep track of the trial period. This involves recording the first run date/time and incrementing that date/time when the software is launched each subsequent time and comparing that against the trial period.

2. Protect against backdating - turning back the computer clock to get more trial time.

3. Protect against uninstall/reinstall.

Dealing with all three of these issues becomes complicated; let's look at a solution using a licence file. What about a licence file will solve all the issues listed above?

1. The licence file will contain the First Run Date (FRD), the Last Run Date (LRD), and other specific user and product info.

2. A licence file should be encrypted to ensure it cannot be tampered with.

3. A licence file should be moved to the user's AppData (or equivalent) folder by the installer software (such as NSIS). This ensures the first run date is only ever recorded once... what do I mean by this? If your app had to check first before opening and writing to the license file, then someone could easily circumvent the trial version by deleting the file at which point your application would be forced to move/write the licence file again and the user would be able to start the trial over again. Well, the installer only ever runs once. So, if it copies over the licence file during the installation process then our application, when it runs the first time, only has to check if the file is there; if not then the trial has been tampered with, if it's there then read the FRD, and if blank then we can be sure it's writing the FRD for the first and only time.

4. The file could be hidden to ensure that an un/reinstallation of your software wouldn't circumvent your trial security. Another method is to write to the registry some entry that's obscure or looks like some other info for your software... this is what's called security by obscurity which is frowned upon in the industry, in general, but there's really no way around it in the case of trial software methods.

5. A licence file can be used as a red-herring if you want to use an obscure/hidden registry entry to save the real trial version information. If that's the case, you should follow the same steps as above and have your installer write the initial registry entries so it cannot be as easily circumvented by your code checks.

Encryption is a big part of trial version security. If you're using MX2004 or above then you can find javascript ports of some strong encryption algorithms such as AES or RSA. RSA is an asymmetrical (ie public/private key) encryption algorithm whereas AES is a symmetrical (ie. private key) algorithm. The important things to look for in an implementation are ones that will encrypt a variable length string. These implementations use modes to encrypt fixed length chunks of the string, thus making the core encryption algorithm useful in practical situations such as encrypting variable length strings.

Creating a trial/registration .dir file (trial window) that gets published with the main application .dir file:

Below, I've outlined these steps so you can see what I mean. I've tested this process and it's solid, AFAIK. Here are the steps:

1. Create a project and name it movie1. Add a framescript with the 'go the frame' code on it. 2. Add a label named 'continue' on the frame just after the 'go the frame' framescript. 3. Add a button, and this code: go to frame "continue" 4. Now, go into the Publish Settings options and go to the 'Files' tab and add any of your other .dir files you want under the 'Additional Files:' heading (the option to Play every movie in list will be checkmarked by default. Leave it like that). 5. Now, Publish your project and you will have ONE .exe called movie1.exe which contains two .dir files that have been published. 6. Open your User Temp folder and observe the folder that's created when you run movie1.exe... no temp .dir file is created when you run movie1.exe 7. Creating another .dir with this code: go to frame "continue" of movie("movie1") ...does not work as it's looking for a .dir or .dxr or .dcr and will not work with an .exe.

What this means is you can create a single executable that runs the trial window with all your trial version code and if everything checks out in the licence file then you can go to the main application movie. The trial window can be used to display the trial information, including a registration section, if you like. Google examples of trial version software to get ideas of what should be included in a trial version display.

FRD = First Run Date LRD = Last Run Date -- this one would get updated every time the app was run.

CRD = the systemDate NumDays = 30 -- the number of days for trial version

dateGood = False

If LRD > CRD Then -- the system clock was rolled back dateGood = False Else If (the systemDate) > (NumDays + FRD) Then -- trial version has expired dateGood = False Else If CRD > LRD Then -- everything is ok, so write a new LRD date in registry or wherever else dateGood = True Else If CRD = (_movie.systemDate) Then -- the dates are both good dateGood = True Else dateGood = False End If

Typical Place to Write Application data to the Registry: HKCU\Software\<AppName>\<version>\ eg. HKCU\Software\TRiShield\1.0\