Solo lectura

Google Chrome - Foro de ayuda

Esta página web es un archivo de los hilos antiguos de los foros de Google. Más información

Animated Gif errors

Mariano La Penna
18/10/10 7:52
Hello.

  I'm showing an animated GIF inside a page, that GIF doesn't have loop, it is not infinite, it's 19 frames long. Sometimes I need to make it start again, I do that through Javascript and it works (see the code below). In the rest of the browsers I tested it (even in Chrome for Mac) the GIF starts again from zero until 19th frame and it stops, that's Ok. But when I try it in Chrome for Windows 7, the Gif starts again but it gets stoped in the first frame, and I have no way to make it go through all frames again.

Versión de Google Chrome: 6.0.472.63
Sistema Operativo: Windows 7 (it also happens in Windows XP)
Mensaje de error: no message, the gif gets stopped in the first frame.
Extensiones instaladas : none


This is a practical example, you can use as coin01.gif any gif that doesn't have loop, which it is not infinite.

<html>
<head>

<script type="text/javascript">

a           = new Image();
a.src = 'coin01.gif'

function animCoin(){
        document.getElementById('coinDrop').src = a.src;
}

</script>
</head>

<body>

<img id="coinDrop" src="coin01.gif" />
<br/>
<input type="button" onclick="javascript:animCoin();" value="CLICK" />

</body>
</html>


----

Thanks!

Mariano

Respuestas (0)