View Full Version : animated .gif that freezes with script use
07-31-2002, 01:41 AM
I am using an animated .gif img as a link on a page that has quite a few different scripts running on it. (See link below)
All runs smoothly, until function "hideTip2" is called. (Click on the right-hand-most purple flower, then close the pop-up using the leaf.) As the pop-up closes, the .gif img freezes. Why? And does anyone know what I might do to prevent it from happening?
Click for prototype page (http://freespace.virgin.net/nathan.taylor/Demetri/index.html)
07-31-2002, 02:08 AM
But aside from that,
I don't know why gifs sometimes freeze during certain scripts, but I've seen it happen before... I also don't know how to stop it from happening...
What I do know is a workaround you can use - simply have the browser reload the image. It should be fast and painless, as the image should already be in the browser's cache... all you have to do is add a bit to the onclick of the leaf to make it reload the image...
In the onclick, you would add something like:
The above kind of link causes animated gifs to always stop because the browser thinks you are following a link so it stops all animations.
The correct way to do it is
<a href="#" onClick="hideTip();return false"><img src="close.gif" border="0"></a>
(The "return false" is important)
07-31-2002, 11:04 AM
RoyW, Thank you so much. That's sorted out my little bee really well!
HappyDude said that the page causes a lot of errors, but it works fine on my browser (IE5.5) which is the intended target.
How do I know if it's generating errors, and what can I do to avoid them when I find them?
(Click on link in first post to view prototype page)
08-01-2002, 03:18 AM
I'm running IE 6.0...
The errors I'm getting are "'filters.alpha' is null or not an object"
In NS 6.2, I'm getting no errors, but a few of the effects cause the browser to go very choppy and freeze up now and then.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.