From: Joaquin S. <ca...@el...> - 2000-11-21 22:40:34
|
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 = =3D 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 =3D null", and it will run properly. Example: image =3D new image() image.onload =3D myfunction() image.src =3D myanimated.gif function myfunction(){ ... ... ... image.onload =3D null } I hope this can be usefull for somebody with the same problem. Thanks. Gracias. J.S.S. |