QuickTime Developer Series

Sample Chapter


| Next | Prev | Top |

Making a Poster Movie

Here'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:

  1. Make a QuickTime movie that contains just the still image. Let's call it Poster.mov . You can do this by opening an image in QuickTime Player and saving it as a self-contained movie. Or you can click on any frame in a movie, choose Copy, New, Paste, and then Save.
  2. Embed the poster movie in your Web page and set the HREF and TARGET parameters so the real movie loads when someone clicks the image:
  3. <EMBED SRC="Poster.mov" HEIGHT=176 WIDTH=120
    HREF="Other.mov" TARGET="myself">

    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:

  4. Pass the CONTROLLER="False" parameter in the <EMBED> tag for the poster movie:
  5. <EMBED SRC="Poster.mov" HEIGHT=176 WIDTH=120
    HREF="Other.mov" TARGET="myself" CONTROLLER="False">

  6. Use Plug-in Helper to put the CONTROLLER="True" and AUTOPLAY="True" parameters inside the other movie,
    as shown in the following illustration:

  7.  

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.


| Next | Prev | Top |
Copyright 2002 by Academic Press


Home | Updates | Corrections | FAQ | Table of Contents | Sample Chapter