animatated gif's and onmouseover - help! what am i missing here? (Posted by brusselsprouts)

They have: 9 posts

Joined: Sep 1999

How does one effectively combine an image rollover script with animated gif's without using arrays? I have been experimenting with using animated gifs and am attempting to combine a basic javascript with onmouseover/onmouseout to change a particular gif to an animated gif, but the animated gif does not reload with the rollover (it sticks on the last frame after the page is finished loading).
Am I missing something important? Beyond making the image an infinite loop or using arrays in the javascript to animate, is there anything I can do?

An example : www.taberbuhl.com/taber.html
Essentially, this is what I am trying to accomplish.

----------
ouch!

They have: 297 posts

Joined: Apr 1999

I'm afraid no. Well, maybe there is a very comlicated way. I saw a script @ dHTML.com which extracts frames from an animated gif. You might be able to dynamically extract frames from the animated gifs and load them into your array. But as far as I know nobody has ever done this before. Post here if you succeed.

Later,

Malte

----------
Malte Ubl - [red]Germany[/red] - http://www.schaffhausen-interactive.de/
[red]The beats of 1000 hearts inside...[/red]

They have: 9 posts

Joined: Sep 1999

Hi, here is the code you put at the top of the page
<!--
function change(ObjectName, ChangeTo)
{
document[ObjectName].src = eval(ObjectName + ChangeTo + ".src");
}

imageon = new Image(15,100); <- size of image
imageon.src = "img/nav-image-on.gif";
imageoff = new Image(15,100);
imageoff.src = "img/nav-image-off.gif";
//-->
</script>

here is the scriptet to call the image:

<a href="index.html" onMouseOver="change('image', 'on')" onMouseOut="change('image', 'off')" target="index"><img name="image" src="img/nav-image-off.gif" width=100 height=15 border=0>

I hope this helps..
sonicdesigns.com

----------
SONICdesigns - Professional Online/Offline Design

They have: 9 posts

Joined: Sep 1999

Hi, will actually there is a way, I've done it before, but unfortunately i have foregotten how to do it, i will post back later today with the script..
Hope this will help you..

----------
SONICdesigns - Professional Online/Offline Design

They have: 9 posts

Joined: Sep 1999

Hmm.. That is pretty much the script I am using.

I am using a similar script to the person who seemingly got it to work. (Why does it work for him? Do you see it working? www.taberbuhl.com/taber.html)

I think I will give up and use an array.

Thanks though, everyone.

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.