Animated Rollovers - ..how..?

They have: 5,633 posts

Joined: Jan 1970

Hi,

I was wondering how to do a rollovers with animated gif?

Your help is appreciated,

Malte.

----------
Malte Ubl - Germany - http://goKewl.com/
The beats of 1000 hearts inside ... the merciless pulsation ... and all I know is I'll be back ... back to trance nation!

They have: 112 posts

Joined: Apr 1999

Hi,
I believe it would be the same as creating basic mouse over scripts if you have the gif's animated using an animator.

They have: 2,390 posts

Joined: Nov 1998

Not sure exactly what you want here that is complicated. I would suggest a simple mouseover script using the ani gifs instead of the normal gifs...however as I know you are not a newbie I can only assume that I have missed the point Smiling
Please explain.
JP

----------
The Webmaster Promotion and Resource Center.
Visit: http://www.what-next.com

They have: 5,633 posts

Joined: Jan 1970

What I want is that the animated gif is only played once upon every mouse over replacing a normal static gif. I think a animated gif with a sigle loop would only work once.

You have to do something comlicated with timeouts, etc. Its pretty complicated JavaScript code.

Hope its clear now. I'm a little drunk, so it might now be.

Later,

Malte

They have: 268 posts

Joined: May 1999

Hi Malte,

You have to find a script that doesn't preload images. You can find an example (I use this script quite often) at Professional Web Design. The url is http://junior.apk.net/~jbarta/tutor/buttons/index4.html. By the way this guy wrote the tutorials that I used when I first started writing html.

----------
My goal in life is found in Phillipians 4:8-9

My goal in life is found in Phillipians 4:8-9
shoutingrock.org/troop214

They have: 5,633 posts

Joined: Jan 1970

Jim, I dont think not to preload would be an option for me.

I have an example for what I want:
http://www.aral.de/intro.htm.

There is an image that morphs onMouseOver. I'm not sure I understand perfectly what they are doing but I think its not really an animated gif, but animation done with JavaScript.

I could copy the code from the Aral homepage, but I would like to have some tutorial that covers the subject.

Later,

Malte

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

You could use the setTimeout function to runback through and show a series of images. If you had the right images, it would appear to be a morph or an animation.

I put up a sample page of this idea, it runs through a series of images on the mouseover (though since the images I have aren't in a visual sequence it doesn't look like a morph, though with the right series of images it could.

The URL:
http://www.pageresource.com/zzztest/testgokewl.htm

The transitions go at 1 second intervals in the sample, you can speed it up by changing the time in the setTimeout function.

If this is the type of script you could use I may well write a tutorial on how to use it at my site. Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 5,633 posts

Joined: Jan 1970

Thanx John, thats the thing I was looking for.

My problem is I have to do these Rollovers on 10 images with each 12 frames. The simple animated gifs have only 11k; thats fine for the customer, but I guess having a total of 120 images loaded would be a little too much.

Could you possibly use a JavaScript to rip a frame off an animated gif? I know this would be really complicated.

Thanx,

Malte

----------
Malte Ubl - Germany - http://goKewl.com/
The beats of 1000 hearts inside ... the merciless pulsation ... and all I know is I'll be back ... back to trance nation!

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

I see what you mean, that could take a while to load. Smiling

If there is a way to pull out a frame, I don't know it but I'll keep an eye out in case I see something like that or another workable solution. Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.