Forum Moderators: open

Message Too Old, No Replies

animated gif error?

         

scorpion

6:21 am on Apr 1, 2003 (gmt 0)

10+ Year Member



Anybody notice this phenomenon:

<a href="javascript:" onclick="afunction();">

When you return from this function, all the animated gifs on the page stop moving through their frames? I noticed this where afunction() was a bookmark function that popped up the bookmark window panel. Suddenly all the animated gifs on the page stopped cycling until you hover over them again...

tedster

6:33 am on Apr 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, that happens. In fact, animated gifs have had all sorts of bugs throughout various browsers and versions. In the beginning, different browsers interpreted the speeds differently. That was a nasty mess.

In general, I've decided long ago not to use animated gifs to convey essential information. There have been too many surprises.

One of my favorite ways to use animation is to use an animated color gradient in a background image which only displays on mouseover. What do you know, Opera 7 now doesn't support animation in a background image, but it did since version 3.

I've also made some pages where the body background was animated. It was a very interesting effect when it was kept to very subtle, although some people said I should supply motion sickness bags for those pages.

Anyway, those were just extras, pretty much shoow-off stuff, and not essential for the communication. You can't depend on nothin' but the basics, but you can get REALLY good with the basics.

HocusPocus

10:26 am on Apr 1, 2003 (gmt 0)

10+ Year Member



A workround to your problem is to 'reload' the image when the window gains focus. (the image may already be cached)

Name each image..

<img src="animated.gif" name="image1">

Then set a window event

<SCRIPT language="JavaScript">
<!--

function reloadims()
{
document.image1.src = "animated.gif";
// list other animated gifs here
}
window.onfocus = reloadims;

//-->
</SCRIPT>