Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> First Defeat
kvarnerexpress
post Apr 10 2005, 07:37 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



I have 3 images that change to short animated gif's onmouseover and into a second animated gif onmouseout...

This works fine in ie but in firefox all the three images change to the "out animation" onmouseout


Code:
CODE
if (document.images) {
a2alpha = new Image();
alpha2a = new Image();
a2alpha.src = "graphics/a2alpha.gif";
alpha2a.src = "graphics/alpha2a.gif";
}
else {
a2alpha.src = "";
alpha2a.src = "";
}
function animate(arrow) {
document.getElementById('arrow' + arrow).src = a2alpha.src;
}
function deanimate(arrow) {
document.getElementById('arrow' + arrow).src = alpha2a.src;
}

....

<img src="graphics/arrow.gif" class="arrow" id="arrow1" style="top: 201px;">
<img src="graphics/spacer.gif" class="boverlay" style="top: 190px;" onmouseover="active('1'); animate('1');" onmouseout="deactive('1'); deanimate('1');">
<img src="graphics/arrow.gif" class="arrow" id="arrow2" style="top: 273px;">
<img src="graphics/spacer.gif" class="boverlay" style="top: 262px;" onmouseover="active('2'); animate('2');" onmouseout="deactive('2'); deanimate('2');">
<img src="graphics/arrow.gif" class="arrow" id="arrow3" style="top: 345px;">
<img src="graphics/spacer.gif" class="boverlay" style="top: 334px;" onmouseover="active('3'); animate('3');" onmouseout="deactive('3'); deanimate('3');">

I have noticed that, in firefox, it works fine the first time the function is called and the second time it then changes both the new "arrow" and the old one.

Is this a common firefox problem that i have missed?

All help is appreciated

Kvarnerexpress

Notice from snlildude87:
All code goes in the [code] BBCode tags. Thank you.


This post has been edited by snlildude87: Apr 10 2005, 08:24 PM
Go to the top of the page
 
+Quote Post
snlildude87
post Apr 10 2005, 08:31 PM
Post #2


Moderator
***************

Group: Members
Posts: 2,325
Joined: 8-March 05
From: Mawson, Antarctica
Member No.: 4,254



Hmm, in Firefox, go to Tools -> Options... -> Web Features -> make sure the JavaScript checkbox is checked -> Advanced ... -> make sure Change Images at the bottom is checked.

If that doesn't work, try reading my post about rollover images, and see if you can try to incorporate it into your page. smile.gif

Feel free to PM me or post a reply if it doesn't work out!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Man U - Gracious In Defeat(1)
  2. Day Of Defeat : Source(2)


 



- Lo-Fi Version Time is now: 6th September 2008 - 02:21 AM