Page 1 of 1

Looking for animated gif event...

Posted: Sat Apr 14, 2007 12:47 am
by JellyFish
I'm looking for a way to trigger a function when a gif has finnished it's animation, with javascript. Is this possible in anyway?

Posted: Sat Apr 14, 2007 12:49 am
by John Cartwright
As far as I'm aware no. Perhaps time the event and use a timeout?

Posted: Sat Apr 14, 2007 1:00 am
by JellyFish
I could use a timeout or animate the gif with javascript. Animating with Javascript will give me full control over the animation but I don't know how advisable this would be? Would the animation preform less as good with javascript?

Posted: Sat Apr 14, 2007 1:07 am
by John Cartwright
I'm not very knowledgable in javascript, so I'll let the other users tackle this one.

Posted: Sat Apr 14, 2007 7:12 am
by feyd
Provided you aren't creating multiple objects on the fly, Javascript will handle animation fairly fine unless your frame rate is too high. You will have to make sure all the images are loaded before starting or it will potentially look very odd.

Posted: Sat Apr 14, 2007 1:50 pm
by Kieran Huggins
sounds like you have a need for flash - I'm not usually a flash proponent, but when it makes sense it makes sense.

Posted: Sat Apr 14, 2007 2:00 pm
by Benjamin
js could be used to flip through an array of images onload, then once all the images have been displayed, call your function.

Posted: Sat Apr 14, 2007 2:20 pm
by JellyFish
astions wrote:js could be used to flip through an array of images onload, then once all the images have been displayed, call your function.
That's what I was thinkin'.

Flash would be great, but I don't have any flash design software. Is there a way to write flash by hand?

Posted: Sun Apr 15, 2007 4:06 am
by Kieran Huggins
Adobe ImageReady will export an animation as a swf - it comes with photoshop.