-
Stop Animation with HTML
Does anyone no if there is an HTML code that will stop an animation after a number of rotations or actions....
I have some animation on a business Intranet site, and it has been requested that the animation run a few times and then stop...but that it will restart once the page is refreshed...
Any suggestions would be welcomed!
Thank you
-
What sort of aminations?
When you create animated gifs you can usually set the number
of times the animtion will loop.
-
What about animations that you have not created?
Is there a way to stop the animation after so many loops, or is that only with those that you personally created?
-
I'm not aware of any way of specifying the number of loops using script.
but it should just be a matter of getting some freeware gif editor,
opening the file changing the settings and saving it again.
-
this is what i would try doing, assuming you want a animated gif.
you need 2 image files(the animated gif, and a static gif)
then when you load the page you have the animated gif playing
<img src="anim.gif" name="foo">
then you need a setTimeOut function that will trigger a function
that will replace the anim.gif with static.gif)
function swi() {
document.images['foo'].src='static.gif';
}
in you <head>
a = setTimeOut("swi()",5000); //this will call the function after seconds
my example is not tested but should give you one way of dealing with the problem
regards
bsw