Attribute for <IMG ...>
LOOP =
INFINITE
| -1
| # of loops
LOOP
states how many times the movie should repeat itself. You can either state a
finite number of loops, or you can make the movie loop forever.
INFINITE
(or
-1
) loops the movie over and over as long as the page is
on the screen. For example, this code produces a movie which loops continuously:
<IMG
SRC="../graphics/moonflag.mpg"
DYNSRC="../graphics/moonflag.mpg"
LOOP=INFINITE
ALT="Astronauts on the moon">
which gives us
You can specify a finite number of times for the movie to loop.
This code produces a movie which loops ten times:
<IMG
SRC="../graphics/moonflag.mpg"
DYNSRC="../graphics/moonflag.mpg"
LOOP=10
ALT="Astronauts on the moon">
which gives us
The problem with specifying a finite number of loops is that it is difficult to predict
how many time is necessary to make sure the user will see the movie. For example, the
movie in this example is way down near the bottom of the page. Even though the movie
looped ten times, most users will not be down so far on the page before it is done. (It
is worth noting that with some browsers, you can click once on the movie and it will run
again the specified number of loops.) Either loop infinitely with INFINITE
,
control when the movie starts using the START
attribute, or, best of all, use the
CONTROLS
attribute to give the user control over playing the movie. Don't use
LOOP
in the same tag as CONTROLS
. There are inconsistent results as to which attribute takes precedence.