An example of this applet is being displayed on your right. (It may take a minute or two to load.) This applet runs a simple script file ("cold.txt", in this example), loading the specified images and then blending them in a time dependent manner. This blending can be used to fade in one image as you're fading out another (as in this example) or can be used to perform single image fades. You can incorporate this applet into your web pages to display slide shows which will be more interesting then static images and will conserve web page real estate.
The key component of this applet is the blender class. You can read more about this class, see further blend examples and read about the blend script file format on the Blend Class Demo page. As mentioned on that page, generally the blend class gauges the performance of the machine it is running on and uses this information to perform the blend, using more frames on faster machines and fewer frames on slower machines. So, though this example is a little shaky on my machine, it should run smoother on newer and more powerful machines. This machine dependent performance and not having to manually create the intermediate frames are some of the advantages that this applet has over executing these blend effects in static media, e.g. animated GIFs.
Clicking on the applet will bring up a Blender Control Window which allows you to pause or resume the blend and read about the images being used and about the Blender Applet. Also, this Control displays the performance statistics of the applet. The performance numbers I get on my 100 MHz Pentium with 40 MB RAM running Windows 95 are...
using Internet Explorer 4:
Total Number of Frames: 69
Est. Min. Time per Frame: 156 ms
using Netscape Navigator 4:
Total Number of Frames: 65
Est. Min. Time per Frame: 165 ms
I have no idea what the performance numbers are for Netscape Navigator 3 (and neither will you) since Netscape Navigator 3 is none too happy with Java dialogs and simply refuses to display the About Images, About Blender and Blender Stats dialogs. While I'm bad mouthing Navigator 3, let me add that it handles colors poorly and runs slower than Navigator 4 or Explorer 4. It is worth you're while to view this page with Netscape Navigator 4 or Internet Explorer 4.
If you feel like it, drop me a line and let me know what kind of performance numbers you get for this example on your machine. FYI, the drawing area in this example is 255 pixels wide by 190 pixels high.
|
If you want to use this applet on your web pages or just simply want to look at the source to see how it's done, download the ZIP file listed below. Extract the files to a folder (e.g., "c:\blender") and view the "readme.html" file. It should contain all the information you need. blender.zip |