David said:
Well, animated gifs are not "animated" in any way that your script can
control. The gif is its own little file and will continue to cycle
through forever until you destroy or alter the img tag it's contained
in. Any other action you take to "freeze" the gif will be hacky and
likely not supported across browsers. I'd suggest taking a snapshot
of the GIF wherever you'd like it to stop, saving that as an image
file, then swapping the src attribute of your img tag in script at the
appropriate moment.
-David
If Jeff is looking to stop the GIF’s after a predetermined amountof
time, he would be better off editing the GIF’s themselves to loopfor a
specific number of times, rather than indefinitely. This has to be done
by hand with an image-editing program, and the newly edited GIF will
need to be re-uploaded to the site manually.
There is a possibility that it can also be done with CGI (such as
ASP.NET 3.0, PHP5 or Perl... it’s been a while since I edited a GIF
using ASP.NET), but a page refresh is required to produce an image with
a different number of repetitions every time.
However, I am getting the impression that he may be hotlinking the
GIF’s, because the easiest thing to do (to have a GIF that does not
animate at all) is to (sort of) use your method... to extract a single
frame of the animated GIF, save it as its own file, and use that
instead. If Jeff is hotlinking, and does not control the GIF in
question, then this could explain his question.
You are right, however, in that an animated GIF cannot be arbitrarily
stopped. It can only be replaced by another image that is static, or set
to stop after a specific number of repetitions.
I hope this helps.
...Geshel
--
*********************************************************************
My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL†(all uppercase).
*********************************************************************