Writing HTML

This, of course, isn't a book about HTML, so I'm going to assume that you know the basics about coding Web pages, and that you have an application (such as Bare Bones Software's BBEdit, or even TextEdit) that you use to build pages. If that's not the case, check out Elizabeth Castro's book HTML for the World Wide Web: Visual QuickStart Guide, which remains the best HTML guide I've read (I said so even before I got involved with Peachpit Press).

That said, there are still some important things to know about adding a movie to a Web page using HTML. There are two ways of going about it: you can copy the file to your Web directory (provided by your Internet service provider) then link directly to it; or you can embed the movie on a Web page so that it's part of the page's layout.

To link to a QuickTime movie file:

  1. In your HTML editing application, enter the following code where you want your movie link to appear. The user will see only the linked text; clicking it will download the movie.

     <a href="http://www.youraddress.com/sample.mov">Click here</a> 
  2. Insert the real names of your Web address and movie filename in place of youraddress.com and sample.mov (Figure 15.18). For example, a movie on my Web site would look like this (go ahead and put the URL below into your Web browser to view the movie).

    Figure 15.18. Add a simple Web link that points to your QuickTime movie file. The HTML text in the top window creates the Web page in the bottom window.

    graphics/15fig18.jpg

     <a href="http://www.necoffee.com/imovievqs/secretmovie.mov">Is it really a secret?</a> 

Embed a Headache

If you know how to embed an object already, you may be wondering why the example on the next page contains so much other information. In late 2001, Microsoft stopped supporting the plug-in architecture used by Web browsers since long before Microsoft even got into the browser business (when a QuickTime movie appears on a page, a QuickTime plug-in not the browser by itself is doing the work of playing it back correctly). Instead, Microsoft switched to its own ActiveX architecture but only under Internet Explorer 5.5 and later for Windows. So although movies added using the regular method of embedding objects still work on your Mac, anyone with a recent version of Windows likely won't be able to see it. Find more information at developer.apple.com/quicktime/compatibility.html.

To embed the movie on a page:

  • In your HTML editing application, enter the following code where you want the movie to appear. Be sure to change the two instances of sample.mov to your actual filename, plus the two instances where the width and height are defined.

     <OBJECT CLASS WIDTH="160" HEIGHT="144" CODEBASE="http://www.apple.com/qtactivex/ qtplugin.cab"> <PARAM name="SRC" VALUE="sample.mov"> <PARAM name="AUTOPLAY" VALUE="true"> <PARAM name="CONTROLLER" VALUE="false"> <EMBED src="/books/2/42/1/html/2/sample.mov" WIDTH="160" HEIGHT="144" AUTOPLAY="true" CONTROLLER="false" PLUGINSPAGE= "http://www.apple.com/quicktime/ download/"> </EMBED> </OBJECT> 

    Note that the unintelligible gobbledygook following "CLASS0" WIDTH="90%" BORDER="1">

Deciphering HTML Attributes

So what is all that junk I threw in there? Here's a breakdown of the tag attributes:

OBJECT CLASSID: To work properly under Windows, a QuickTime movie must be defined as an object. The CLASSID value identifies the content as a QuickTime movie.

WIDTH and HEIGHT: These values tell the browser the width and height of your movie in pixels.

CODEBASE: This URL gives Internet Explorer for Windows some necessary information about the QuickTime format.

PARAM: This is a parameter of the object, which consists of a name and a value. SRC is the URL that points to your movie file; AUTOPLAY tells the browser whether to automatically play the movie when it loads (in this case "true" means yes); CONTROLLER tells the browser whether to display the QuickTime controller beneath the movie (in this case "false" means no).

EMBED: This is the tag that actually puts your QuickTime movie on the page. It includes the same attributes as PARAM, though in a slightly more compact fashion. A Web page that contains only this tag will display the movie correctly in all Web browsers except Internet Explorer 5.5 and later for Windows.

PLUGINSPAGE: This tells the browser where to go in the event that the QuickTime plug-in is not installed.

</EMBED> and </OBJECT>: These are closing tags, indicating the end of the commands.



iMovie 3 for MAC OS X. Visual QuickStart Guide
iMovie 3 for Mac OS X (Visual QuickStart Guide)
ISBN: 0321193970
EAN: 2147483647
Year: 2003
Pages: 125
Authors: Jeff Carlson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net