HTML The Definitive Guide (55 page)

Read HTML The Definitive Guide Online

Authors: Chuck Musciano Bill Kennedy

BOOK: HTML The Definitive Guide
11.62Mb size Format: txt, pdf, ePub

The following
intro.avi
movie clip will play from beginning to end, then restart at the beginning and play through to the end nine more times: Whereas the following movie will play over and over again, incessantly: Looping movies aren't necessarily meant to annoy. Some special effects animations, for instance, are a sequence of repeated frames or segments. Rather than string the redundant segments into one, long movie that extends its download time, simply loop the single, compact segment.

5.2.7.4 The start attribute

Normally, an Internet Explorer movie clip starts playing as soon as it's downloaded. You can modify that behavior with the start attribute in the movie's tag. By setting its value to mouseover, you delay playback until the user passes the mouse pointer over the movie viewport. The other valid start attribute value, fileopen, is the default: start playback just after download. It is included because both values may be combined in the start attribute to cause the movie to play back automatically once after download, and then whenever the user passes the mouse over its viewport. Add a value-separating comma, with no intervening spaces, or else enclose them in quotes, when combining the start attribute values.

For example, our by-now-infamous
intro.avi
movie will play once when its host HTML document is loaded by the user, and whenever he or she passes the mouse over the movie's viewport:

src="pics/mvstill.gif">

5.2.7.5 Combining movie attributes
Treat Internet Explorer inline movies as you would any image, mixing and matching the various movie-specific as well as the standard and extended tag attributes and values supported by the browser. For example, you might align the movie (or its image alternative, if displayed by another browser) to the right of the browser window: Combining attributes to achieve a special effect is good. We also recommend you combine attributes to give control to the user, when appropriate. For instance, if you set up a movie to loop incessantly, you should also include the controls

attribute so the user can stop the movie without having to leave the HTML document.

As we stated in section 5.2.7.4, by combining attributes you can also delay playback until the user passes the mouse over its viewport. Magically, the movie comes alive and plays continuously: 5.1 Horizontal Rules

Other books

Mystery Mile by Margery Allingham
Alchymist by Ian Irvine
The Beltway Assassin by Richard Fox
The Pupil by Caro Fraser
Prince of Fire by Daniel Silva
Fanny and Stella by Neil McKenna