Closed Thread Icon

Preserved Topic: Problem preloading animated gif.... Pages that link to <a href="https://ozoneasylum.com/backlink?for=17876" title="Pages that link to Preserved Topic: Problem preloading animated gif...." rel="nofollow" >Preserved Topic: Problem preloading animated gif....\

 
Author Thread
OMERA
Bipolar (III) Inmate

From: France
Insane since: Mar 2000

posted posted 09-28-2000 16:50

God damn!
I have a function which handle image preloading (with onload = handlePreload() )
, and when i preload an animated gif, the onload event is fired not one time, but ad libitam eternam after the full loading of the an' gif!!!! So the handlepreload() never stop being called!

Any idea to solve my problem?

Thanks!


Das
Maniac (V) Inmate

From: Houston(ish) Texas
Insane since: Jul 2000

posted posted 09-28-2000 17:35

You could put another function in the path. AnimPreload() or something. You would call it in the gif's onLoad, and it would call the normal handlePreload function the first time it's called. It would just do nothing on later calls.

var callcount = 0;
function animPreload() {
if (callcount++ < 1) handlePreload();
}


Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-28-2000 20:49

I'm pretty sure that's an NN problem. So do it as you are for IE, but if they're using NN, then realize that the function will be called once for each frame of the animation.

I'd also recommend just using separate images and animating that way.

OMERA
Bipolar (III) Inmate

From: France
Insane since: Mar 2000

posted posted 09-28-2000 23:37

As extraordinary as it can seem, it's not a NN problem! I have the problem in IE and NN....A strange behaviour, hu?

I did'nt try the solution of das (das is eine solution!) but I suspect that would work.. <img border=0 align=absmiddle src="http://www.ozones.com/forum/smile.gif">

Anyway, I changed and don't preload animated gif no more! <img border=0 align=absmiddle src="http://www.ozones.com/forum/tongue.gif">


« BackwardsOnwards »

Show Forum Drop Down Menu