View Full Version : Start Animation
dagaffer
02-10-2003, 07:03 PM
How would I start an animation on my page? (ie. Im going to be delaying the animation until the whole page has loaded)
Thanx! Gaffer:p :thumbsup:
ez4ne12c
02-10-2003, 09:08 PM
You could just decompose the animated gif (i assume) into its component frames and save these as individual gifs, preload these images, then the onLoad event to animate the loop.
ez
less javascript is required if you just have the page actually load with the first image in the animation, and the onLoad tag containts an image swop script to stick the animation in the first image's place.
dagaffer
02-11-2003, 08:32 PM
Right, thanx I'll try those ideas out!:thumbsup:
beetle
02-12-2003, 09:33 AM
I agree with Beck
have a gif saved that's just the 1st frame, then with the <body>'s onload, change that images' src to the animated version
ez4ne12c
02-12-2003, 09:54 PM
Um i thought i implied the same as Beck ;)
question was 'how do i start the animation?'
decompose image into individual gifs manually
trigger start by onLoad
Im guessing this is a problem because the animation is large
so if you decompose it into individuals you will save download of one frame..
If you want to manually navigate or use jpgs to get smaller files
the animation is done by yeah just toggle innerHTML on the img tag..use setTimeout method..couple of js statements..
If for some reason you have this problem and its not about size of files just do as Beck suggests and load the first frame as a gif
then use onLoad="javascript:my_anim.innerHTML=myfile.gif"
where myfile.gif is the full animation.
i assumed size was the problem ...
ez
dagaffer
02-13-2003, 07:46 PM
yeah, size was part of the problem, but beck's idea suits me & the site more.
Thanx anway!:thumbsup:
ez4ne12c
02-13-2003, 09:43 PM
cool
:D ez :p
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.