| QuickTime Developer Series |
![]() |
![]() |
Sample Chapter |
Making a Poster MovieHere's a practical example of how to use the Plugin Settings text box in Plug-in Helper. Suppose you want to embed a still image in your Web page that loads and plays a movie when someone clicks the image. Suppose further that you want the movie to load and play right where the image is. You can do this, but you need Plug-in Helper to get it right. Here's how:
<EMBED SRC="Poster.mov" HEIGHT=176 WIDTH=120 The problem now is that you don't want the poster movie to have a controller; you want people to click the poster, not try to play it. But you do want the second movie to have a controller, and you want it to autoplay. So:
<EMBED SRC="Poster.mov" HEIGHT=176 WIDTH=120
The resulting Web page has a poster movie with no controller, linked to a movie that plays automatically and has a controller, as shown in the following illustration. You can see this in action by using your browser to open Poster.htm in the SpecialDelivery folder of the CD.
You can't set a separate height or width for the two movies using Plug-in Helper; the HEIGHT and WIDTH settings tell the browser how much space to give the plug-in, and the plug-in itself can't change them. So you have to choose one setting that works for both the poster and the movie. Remember that the controller adds 16 pixels to the height of the movie, so set HEIGHT equal to at least the movie height plus 16. Ideally, the poster image should be exactly 16 pixels taller than the movie. If the poster is larger or smaller than the movie plus the controller, set HEIGHT and WIDTH to the larger dimensions and set an appropriate background color using the BGCOLOR parameter in the <EMBED> tag. Black is an effective background color for most movies. If you want the second movie to load in the QuickTime Player application instead of replacing the image in the Web page, set the TARGET parameter to quicktimeplayer instead of myself . If you want to get really clever (and who doesn't?), you can create a poster that turns into a movie when you click it, then morphs back into a poster when the movie's done. For details, see Poster Movies. That pretty much covers the basics of Plug-in Helper. We'll look at other uses for Plug-in Helper throughout the book, but they all use the same checkbox and set of text boxes that we've just covered. |