Just as a note, I've ported my old GifAnim code to dynapi2 along with building a new/updated animation system. Not quite done yet though, I want to get path animation built into my Sprite widget and make slide animations generate paths.
Dan
On Tue, Nov 21, 2000 at 11:41:01PM +0100, Joaquin S. wrote:
> Hello. I have found a pair of problems on using animated-gif with javascript.
>
> The first and most important is this: when a script execute, the animation stops. why is this? how can i re-animate them?
>
> Try it. put a simple animated-gif, and a hyperlink to a script that simply display an alert-box. The gif stop and it remain stopped all the time.
>
> Y have found a partial-solution to this problem. I reload the image after the sript, but this dont work if the image was preloaded. why?
>
> This is the other problem... the preload process. I make a "image.onload = function()" in the preload process. This is usefull to make a "load progress bar". But if it is a animated gif, the onload event dont stop. the function is called each time the gif moves. this problem make me mad to discover!
>
> I have found a solution to this. in the function called, simply put a "image.onload = null", and it will run properly. Example:
>
> image = new image()
> image.onload = myfunction()
> image.src = myanimated.gif
>
>
> function myfunction(){
> ...
> ...
> ...
> image.onload = null
> }
>
> I hope this can be usefull for somebody with the same problem.
>
> Thanks.
> Gracias.
>
> J.S.S.
>
>
|