Archive of UserLand's first discussion group, started October 5, 1998.

prompting an animation with a mouseclick

Author:stewart
Posted:12/3/1999; 6:37:50 PM
Topic:prompting an animation with a mouseclick
Msg #:13428
Prev/Next:13427 / 13429

i'm looking for a script that will activate an animation with a mouseclick, i.e. i want the image to remain still until someone clicks their mouse on it and then i want the animation to run just once. i think the best way to do this is to have two gifs, one animated & set to run just once, and the other identical to the first frame of the animation but not animated, and then to have a script that exchanges one gif for another.

i have the following script:

this in the head:

and this in the body at the relevant place:

but when i try it out i find that clicking on the non-animated gif makes it jump to the final frame of the animated gif - unless i hit refresh & then click on the gif really quickly in which case i see the tail end of the animation running. it's as if my browser is loading both the animated & the non-animated gifs at the same time & running the animated gif in the background immediately. i need to find a way of making the animation wait for a mouseclick before it runs.

any suggestions anyone has would be most appreciated.


There are responses to this message:


This page was archived on 6/13/2001; 4:53:39 PM.

© Copyright 1998-2001 UserLand Software, Inc.