Flash Applets
This page gives an overview of the way Flash applets are added to a web page, the HTML and script code required, and the way the applet loads the parameters from the datafile.Remember that Flash applets are not standard objects like Java applets (in fact, Cool Focus is currently the only company producing commercial "applets" using Flash), so much of the information in this page is particular to Cool Focus applets only. We decided to use the word "applet" to describe these objects because they look and behave just like Java applets, and we provide a very similar way of setting them up.
What Is A Flash Applet?
It's a visual object that runs in a web browser, like an image. Unlike an image, though, Flash applets are interactive, responding to mouse movement and clicks to change what's displayed, or play sounds, or open a link in the browser.To use Flash applets, visitors to your site must have the Flash player plug-in installed. The plug-in is a free (and very small) download from Macromedia, Inc. The HTML code that places an applet on your web page includes information that can download and install the plug-in automatically if a visitor doesn't have it.
The Applet File
The applet itself is a small file with a .SWF extension. This is the file the browser loads and displays, so it must be available on your server. The HTML code in your page tells the browser where to find this file.For every applet you use on a page, there will be a block of HTML code and a block of script code. So, if you have three applets on a page, there will be 3 blocks of HTML and 3 blocks of script.
The Parameter Datafile
Cool Focus Flash applets are completely configurable - you choose colors, fonts, styles, sounds and behaviors for the applet, as well as the text or images to be displayed, and the URLs to which the applet should link.You type these settings (or parameters) into a text file with a .INF extension, which we call a datafile. When the applet starts running in the browser, it loads the datafile and reads the parameters from it. Each parameter has its own name, plus a value, and must be on a separate line, like this:
BgColor=FFFFFFWhen the datafile has been created and saved, it must be encoded to a format that the applet can read. This encoding can be handled by the Cool Focus Design Studio application (which can create the datafile and web page for you), or you can use our online encoder at www.coolfocus.com/flash/encoder.asp. For simplicity, it's best to give the datafile the same name as the applet file (so the datafile for an applet named CoolStrip.swf would be called CoolStrip.inf), and put it in the same directory as the applet file.
Sound Support
Flash supports the MP3 audio-file format only. There is a great repository of MP3 sound effects for free download at www.flashkit.com/soundfx.
Image Support
Flash only supports non-progressive JPEG images. To use a GIF image, it must be converted to SWF format using the Convert GIFs To SWFs option on the Tools menu of Design Studio.
URL/Link Support
All URLs you include in your datafile (for links, sound effects, images, etc.) can be either absolute or relative URLs. If you use relative URLs, which makes local testing much easier, the URLs are relative to the web page containing the applet (just like ordinary HTML links in the web page).
|