Loading Applets
The details below explain how to incorporate any Cool Focus Flash applet into your own Flash movie. By following the steps below, the applet will be loaded dynamically when you run your movie. The applet will handle all links itself (if it's a menu system or similar linking applet) just as it would when placed on a web page.

1. First Steps
Begin by creating your datafile in the usual way following the steps in this documentation. You must also include these 3 parameters:
Width=250
Height=180
Copyright=Cool Focus, www.coolfocus.com
If you use our free Design Studio application to create your datafile, these parameters will be included automatically. You can easily adjust the Width and Height parameters later in any text editor if you need to.

The first two parameters set the dimensions of the applet when incorporated into your movie; set these to the width and height you want to allow for the applet. These parameters are required: if they are not set, the applet will take the entire Stage area.

The third parameter is also required, and must be included exactly as above (case-sensitively, and with one space after the comma).

2. Copying Files
For simplicity, you should keep the Cool Focus applet file (.SWF file) and its datafile (.INF file) in the same folder as your own Flash movie. When you publish your own movie to your web site, remember to publish the two Cool Focus files to the same location.

3. Adding the Applet to your Movie
Add the following ActionScript to the level or MovieClip object which should contain it:
createEmptyMovieClip("example", 20);
example.loadMovie("Messenger.swf");
This code creates a new, empty MovieClip object to hold the applet, assigns it the name example and a depth of 20. Of course, you can change the name and depth to whatever you choose. If this were placed in the first frame of the first layer, you would refer to the applet as _level0.example and its container would be _level0.

The second line loads the specified Cool Focus applet file. (If the applet file is not in the same folder as your movie, you will need to specify an absolute or relative path to it.)

Using the second line of code above, the Messenger applet would be loaded into your movie and would read its parameters from a file named Messenger.inf in the same folder as Messenger.swf. If you need to specify a different datafile, change the second line to:

example.loadMovie("Messenger.swf?datafile=appletdata.inf");
changing appletdata.inf to the name of your datafile.

4. Setting the Applet's Position
By default the applet will be placed at point 0,0 on the Stage. To position it elsewhere, add the following two lines:
example._x=60;   //horizontal position
example._y=105;   //vertical position
Everything else the applet needs to know is included in its datafile. If the applet has a Transparent parameter, you may want to set this to Yes so that other parts of your own movie beneath the applet can be seen.