RE: JavaScript / Animated GIF

by "Gary Barber" <gazbe(at)radharc.com.au>

 Date:  Thu, 17 Jun 1999 17:28:53 +0800
 To:  "Darren Gerbrandt" <2nerotik(at)nisa.net>,
"Hwg-Graphics@Hwg. Org" <hwg-graphics(at)hwg.org>
 In-Reply-To:  nisa
  todo: View Thread, Original

Darren Gerbrandt mused

AFAIK you can't access the internals of an animated GIF. Its just load the
object (the GIF) and display it from start to finish of the animation for
the nominated number of loops.  The browsers that control the animation do
so by changing readers for the interpretation of the image (GIF type 87 or
89a). Then again you cause the Javascript to substitute the image with
another, that is a rollover. The substituted (rollover image) could be
animated.

What you are really looking for to access the internals of an image, that is
the frames etc is Macromedia's Flash.  But then your animation is a Flash
movie not a GIF, and that's a different story.

http://www.macromedia.com/

Or you could do a custom java animation, you can access the separate frames
in java as well.

Personally I would go with flash if you must have access to the control of
the animation frames.  Especially Version 4.

hope this helps.

Gary

radharc.

> A friend had a question about animated gifs... the question was
> "Is it possible to access individual frames from an animated gif
> using JavaScript or something like that."
>
> The question was in regards to JavaScript rollovers he's seen on websites.
>
> The thinking was that an animated gif would load and responde
> faster than having JavaScript trade between to gifs. He wondered
> if you could say just have one gif with 2 frames in it but be
> able to access each individual frame inside that gif rather than
> having 2 seperate gifs.
>
> Now as far as my knowledge of animated gifs and JavaScript etc
> go. I told him no that it was not possible but that I would ask
> anyway and maybe get some people thinking along those lines.
>
> Now of course I see the problem of having to code the Javascript
> to know what bits of info to look for inside an animated gif and
> of course not having the gif just play it's animation etc.
>
> But would like some more definate info on this.

HWG: hwg-graphics mailing list archives, maintained by Webmasters @ IWA