Another useful feature of AVI files is that they add a "tiny" bit of pizzazz to
your pages. This can often be accomplished with very small AVI clips known as
flashers.
Here are a couple of flashers to illustrate. I have set them to start on mouse-over,
and to loop 5 times:



The flashing blue line is coming from an AVI file that is 1 x 1 pixels, 7 frames, and is 4K.
By setting the HEIGHT and WIDTH attributes of the IMG tag, I am able to stretch it to
any size that I want, much as you would a single-pixel gif in order to draw a
colored line. Because I set the SRC attribute to be a single-pixel gif, this page will
look visually the same on a browser that doesn't support the DYNSRC attribute.
<IMG SRC="/workshop/author/roberth/set2/BLUE.GIF" DYNSRC="/workshop/author/roberth/set2/Blue.AVI" HEIGHT=2 WIDTH=400 LOOP=5 START="MOUSEOVER">
|
The green "chaser" AVI is coming from a file that is 520 x 3 pixels, 20 frames, and is 7.5K. I
am using a single-pixel gif for the static image, which is not quite as exciting as the chaser
video, but again, allows this page to look reasonably well on lesser browsers.
<IMG SRC="/workshop/author/roberth/set2/BLUE.GIF" DYNSRC="/workshop/author/roberth/set2/Blue.AVI" HEIGHT=2 WIDTH=400 LOOP=5 START="MOUSEOVER">
|
Both of these AVI files can easily be created with the AVIEdit tool that comes with the Win32
SDK, and almost any bitmap editing tool. In fact, using a "fancier" AVI editing tool might make
your job more difficult, because many of them assume that you are really trying to create a video
file, and aren't prepared for the very small image sizes that are being used here.
But even with these relatively small AVI files, it is necessary to exercise caution when using them
on your pages. Do a "refresh" of the page, and notice how much time is devoted to loading the AVI
file as opposed to loading a single-pixel gif. This is because the whole media playback engine
needs to be fired up for each AVI file, and even if the AVI file is small, it is a pretty big
chunk of code that is being used to do the animation. So only use a couple of these per page.