Closed Thread Icon

Topic awaiting preservation: help (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8624" title="Pages that link to Topic awaiting preservation: help (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: help <span class="small">(Page 1 of 1)</span>\

 
platyjim
Bipolar (III) Inmate

From: Fromsville
Insane since: Feb 2003

posted posted 04-26-2003 22:38

I need something that will delay an animated gif from playing for any number of seconds. I don't know anything about javascript or DHTML but i thought this would be what one would use to do this. So if anyone has any advice it would be appreciated.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 04-26-2003 23:21

Unfortunately I don't think this is possible. however I think you can do this within the settings of the animated gif.

Alternatively you can create the whole animation via javascript.



.:[ Never resist a perfect moment ]:.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 04-26-2003 23:29

Actually after a small bit of thought what you could do is this.

Create the animated gif. Then create an unanimated gif just like the part you want to sit for a couple of seconds. Now do this, create the image like this

<img name="animated" src="/path/to/unanimated.gif">

Now put this in your body tag
<body onLoad="switchgif()">

Then stick this in your head tags

<script language="javascript">
// set this to the path to your animated gif
AnimatedGifSrc = "/path/to/animated.gif"

// Set this to the number of seconds you want to wait
NumberToWait = 5;

// You can leave from here down alone

// preload the animated gif
anImg = new Image;
anImg.src = AnimatedGifSrc;

function switchgif() {
setTimeout('document.images["animated"].src = anImg.src', NumberToWait * 1000);
}

</script>



.:[ Never resist a perfect moment ]:.

« BackwardsOnwards »

Show Forum Drop Down Menu