By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,446 Members | 1,185 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,446 IT Pros & Developers. It's quick & easy.

how to get animations to repeat themselves endlessly

P: n/a
I've got two GIF files named "Tigger.gif" and "Angry_barbarian.gif"
that contain animations that I want to display on a web page. I've
written the following XHTML code which works for a fraction of a sec-
ond but no more. That is, the animations run for a very short period
of time and then stop. My guess is that they're running through their
short animated period and then stopping. How can I display animations
like this that keep moving, that start over from the beginning as soon
as they reach the end of their animation? Any input on this would be
greatly appreciated.

---Kevin Simonson

"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_

----------------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Animations Test</title>
</head>
<body>
<img src="Tigger.gif" id="tigger"
style="position: absolute; top: 100px; left: 300px
; visibility: visible" />
<img src="Angry_barbarian.gif" id="barbarian"
style="position: absolute; top: 100px; left: 500px
; visibility: visible" />
</body>
</html>

Mar 9 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Hello,

kv******@hotmail.com wrote:
I've got two GIF files named "Tigger.gif" and "Angry_barbarian.gif"
that contain animations that I want to display on a web page. I've
written the following XHTML code which works for a fraction of a sec-
ond but no more. That is, the animations run for a very short period
of time and then stop. My guess is that they're running through their
short animated period and then stopping. How can I display animations
like this that keep moving, that start over from the beginning as soon
as they reach the end of their animation? Any input on this would be
greatly appreciated.
This problem is not related to the way how the images are embedded in the
HTML document.
The speed of the animation and whether it is looping or not can be adjusted
with the image editor you are using to create the GIFs.

HTH

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
Mar 9 '07 #2

P: n/a
[Followup-to set to: alt.html]

kv******@hotmail.com wrote :
I've got two GIF files named "Tigger.gif" and "Angry_barbarian.gif"
that contain animations that I want to display on a web page.
You cross-posted your message to 2 newsgroups but you did not indicate
to which group you want to get an answer. So, I set a followup-to to
alt.html. Please next time, set the followup-to.

It would have been useful here to post an url where we could have
examined your webpage and those GIF files.

I've
written the following XHTML code which works for a fraction of a sec-
ond but no more.
I'm not sure I understand what you mean. Your XHTML code just position 2
images absolutely and that's it. By default, <imghave visibility set
to visible: so that's unneeded in your CSS code.
That is, the animations run for a very short period
of time and then stop.
What exactly "run" in your webpage? The position of images or GIF files
which are animated? It's not clear.
My guess is that they're running through their
short animated period and then stopping.
No url. No image files available.
How can I display animations
like this that keep moving, that start over from the beginning as soon
as they reach the end of their animation?
"like this"? Like what? No url. No image files available.
Any input on this would be
greatly appreciated.
Mozilla-based browsers (Seamonkey 1.x, Firefox 1+, Camino 1.x, Galeon,
K-meleon 1.x, Epiphany, Mozilla Suite 1.x) can prevent images from being
animated endlessly.

In about:config,
image.animation_mode
can be set to once.

Opera 9 can prevent animated gifs from being animated endlessly.

Animated gifs are annoying as they disturb peripherical vision and
actual reading. Before loading animated gifs, a web author has to ask
himself if those animated gifs are actually true content or decorative
stuff and if the frequency of animation is going to annoy rather than
help the user.

Animated gifs can be as annoying, disturbing the viewing/reading of a
webpage as much as an agressive advertisement in Flash.
>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-
transitional.dtd">
Why XHTML? And, more importantly, why transitional?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Animations Test</title>
</head>
<body>
<img src="Tigger.gif" id="tigger"
style="position: absolute; top: 100px; left: 300px
; visibility: visible" />
<img src="Angry_barbarian.gif" id="barbarian"
style="position: absolute; top: 100px; left: 500px
; visibility: visible" />
</body>
</html>
[Followup-to set to: alt.html]

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages
Mar 9 '07 #3

P: n/a
On Mar 9, 12:08 pm, Benjamin Niemann <p...@odahoda.dewrote:

=This problem is not related to the way how the images are embedded in
the
=HTML document.
=The speed of the animation and whether it is looping or not can be
adjusted
=with the image editor you are using to create the GIFs.

I had just copied some already existing GIF animations. Does
anyone know where I could get access to a bunch of cartoon animations
that repeat endlessly, instead of looping for just a short period of
time?

I'm doing this for a class assignment; I need one animation for
when a user guesses a math problem correctly and another for when the
user guesses a problem incorrectly. If the animation only runs a fi-
nite amount of time and then stops then that looks funny, because the
user gets the problem right and instead of an animated Tigger the user
gets a frozen Tigger.

Do forever-looping GIF files that might serve this purpose exist,
or do I have to construct them in an image editor? Is there a way to
take the mentioned Tigger GIF and Angry Barbarian GIF and modify them
in an image editor so that they run forever instead of eventually
stopping?

By the way, the URLs for the two GIF files are: "http://
www.gifani
mations.com/action/ImageDisplay?group=1&category=10&index=20&dir=stay "
and "http://www.gifanimations.com/action/MenuSelection/1/10".

---Kevin Simonson

"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_

Mar 9 '07 #4

P: n/a
kv******@hotmail.com wrote:
Do forever-looping GIF files that might serve this purpose exist,
or do I have to construct them in an image editor? Is there a way to
take the mentioned Tigger GIF and Angry Barbarian GIF and modify them
in an image editor so that they run forever instead of eventually
stopping?
To create and edit animated .gif files you need animation software.

Take a look at:
http://www.google.com/search?hl=en&q...=Google+Search

There are links to existing gifs as well as info on the format and
creation/editing software.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
Mar 9 '07 #5

P: n/a
On Fri, 09 Mar 2007 20:52:56 GMT scribed:
On Mar 9, 12:08 pm, Benjamin Niemann <p...@odahoda.dewrote:
By the way, the URLs for the two GIF files are: "http://
www.gifani
mations.com/action/ImageDisplay?group=1&category=10&index=20&dir=stay "
and "http://www.gifanimations.com/action/MenuSelection/1/10".
The Angry Barbarian gif animates for me endlessly both in IE 6 and Firefox.
Must be your browser(s).

--
Neredbojias
He who laughs last sounds like an idiot.
Mar 9 '07 #6

P: n/a
In article <Xn**********************************@208.49.80.25 1>,
Neredbojias <in*****@example.comwrote:
On Fri, 09 Mar 2007 20:52:56 GMT scribed:
On Mar 9, 12:08 pm, Benjamin Niemann <p...@odahoda.dewrote:
By the way, the URLs for the two GIF files are: "http://
www.gifani
mations.com/action/ImageDisplay?group=1&category=10&index=20&dir=stay "
and "http://www.gifanimations.com/action/MenuSelection/1/10".

The Angry Barbarian gif animates for me endlessly both in IE 6 and Firefox.
Must be your browser(s).
Yes, OP should check browser and turn off any preference that
instructs it to loop gifs none or very limited number of times. I
have, eg. my Safari set to loop twice, after changing it, the
gifs concerned loop on and on. The looping is built into the gif
at creation (you can change this by saving it and opening it in
an animation capable image editor) but can be blocked from
exhibiting its groundhog ways. In case of OP, it is almost
certainly a browser preference in this case.

--
dorayme
Mar 9 '07 #7

P: n/a
dorayme <do************@optusnet.com.auwrote:
news: do**********************************...ptusnet.com.au
In article <Xn**********************************@208.49.80.25 1>,
Neredbojias <in*****@example.comwrote:
>On Fri, 09 Mar 2007 20:52:56 GMT scribed:
>>On Mar 9, 12:08 pm, Benjamin Niemann <p...@odahoda.dewrote:
>> By the way, the URLs for the two GIF files are: "http://
www.gifani
mations.com/action/ImageDisplay?group=1&category=10&index=20&dir=stay "
and "http://www.gifanimations.com/action/MenuSelection/1/10".

The Angry Barbarian gif animates for me endlessly both in IE 6 and
Firefox. Must be your browser(s).

Yes, OP should check browser and turn off any preference that
instructs it to loop gifs none or very limited number of times. I
have, eg. my Safari set to loop twice, after changing it, the
gifs concerned loop on and on. The looping is built into the gif
at creation (you can change this by saving it and opening it in
an animation capable image editor) but can be blocked from
exhibiting its groundhog ways. In case of OP, it is almost
certainly a browser preference in this case.
Both gif's are set to loop 233 times, tigger has 4 frames, and
barbarian has 9. Given enough time they both stop at some point.

--
BootNic Friday, March 09, 2007 6:41 PM

Don't worry about people stealing an idea. If it's original, you will
have to ram it down their throats.
*Howard Aiken*

Mar 9 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.