How to detect the end of an animated .Gif image in JavaScript?
I need to detect the end of a non-looping .Gif animation and act on it. In other words, when the animation reaches its last frame, I want it to trigger a function in JavaScript. Is there any way to do this?
I think the previous poster is right that there is no way to access the individual frames in an animated GIF image. Maybe as a workaround, if you know how long the animation runs for, you can setup a javascript timer to fire after that number of seconds.
January 13th, 2010 at 9:24 am
There is no way to access the individual frames of an animated .GIF in javascript.
References :
http://lists.evolt.org/pipermail/javascript/2001-May/000553.html
January 13th, 2010 at 9:59 am
I think the previous poster is right that there is no way to access the individual frames in an animated GIF image. Maybe as a workaround, if you know how long the animation runs for, you can setup a javascript timer to fire after that number of seconds.
References :