...

View Full Version : Can a mouseover be slowed down or faded in/out



norzar2
05-17-2007, 11:01 PM
Hi Guys thanks for helping me with this.
I have a picture and when a mouseover happens it switches to another but can it be slowed to a fade in/out that is more gracefull?



<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="701" HEIGHT="303">

<TR>
<TD ROWSPAN="1" COLSPAN="1" WIDTH="334" HEIGHT="142">
<A HREF="#" onMouseOver="if(document.images) document.test4z0.src='mechy1zzz_1x1.gif';"
onMouseOut="if(document.images) document.test4z0.src='back_1x1.gif';"
><IMG NAME="test4z0" SRC="test4z_1x1.gif" WIDTH="334" HEIGHT="142" BORDER="0"></A></TD>
<TD ROWSPAN="1" COLSPAN="1" WIDTH="367" HEIGHT="142">
<A HREF="#" onMouseOver="if(document.images) document.test4z1.src='port5z_1x2.gif';"
onMouseOut="if(document.images) document.test4z1.src='back_1x2.gif';"
><IMG NAME="test4z1" SRC="test4z_1x2.gif" WIDTH="367" HEIGHT="142" BORDER="0"></A></TD>
</TR>

<TR>
<TD ROWSPAN="1" COLSPAN="1" WIDTH="334" HEIGHT="161">
<A HREF="#" onMouseOver="if(document.images) document.test4z2.src='awards1zz_2x1.gif';"
onMouseOut="if(document.images) document.test4z2.src='back_2x1.gif';"
><IMG NAME="test4z2" SRC="test4z_2x1.gif" WIDTH="334" HEIGHT="161" BORDER="0"></A></TD>
<TD ROWSPAN="1" COLSPAN="1" WIDTH="367" HEIGHT="161">
<A HREF="#" onMouseOver="if(document.images) document.test4z3.src='elecy1zz_2x2.gif';"
onMouseOut="if(document.images) document.test4z3.src='back_2x2.gif';"
><IMG NAME="test4z3" SRC="test4z_2x2.gif" WIDTH="367" HEIGHT="161" BORDER="0"></A></TD>
</TR>

</TABLE>

Arty Effem
05-18-2007, 04:48 AM
I have a picture and when a mouseover happens it switches to another but can it be slowed to a fade in/out that is more gracefull?To blend one image into another using opacity, requires that the images be overlaid, which while possible would complicate the HTML.
A simpler solution would be to ramp down the opacity of the original image to around say 20%, swap to the alternate image then ramp the opacity back to 100%. This effect softens the transition between images without overlaying them. You can see a slideshow example here (http://www.hotspot.freeserve.co.uk/scripterlative?multislide), although for rollovers I would use a higher transition rate.

Whatever you do, the code you have in place is unnecessarily complicated.

Mr J
05-18-2007, 11:31 PM
Sorry, the example I posted has problems so I removed it for now

_Aerospace_Eng_
05-19-2007, 12:24 AM
Maybe this is what you are looking for? http://www.dynamicdrive.com/dynamicindex4/highlightgrad.htm

Mr J
05-19-2007, 08:02 AM
I think I've ironed out the glitch, take a look, see what you think

www.huntingground.freeserve.co.uk/imagery/imgfade2.htm

norzar2
05-20-2007, 11:04 AM
Thanks Arty, Mr J and _Aerospace_ that was all really really helpfull
And the examples exceeded my original idea 10 fold
CF is a great place



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum