View Full Version : JScript for rollover on pictures?

08-04-2005, 03:07 PM

I need help!

I have a background image in black and white. I want to be able to move my cursor over a particular part of the image and have it come up in color and also be a link to another page. In other words, the black and white picture is of an art studio. When the customer moves his mouse over the image to a certain spot, which will have text on it, I'd like for that particular "spot" to come up in color, but the rest will remain in black and white.

Is that possible?

Thanks in advance!

08-04-2005, 03:52 PM
I'd use Flash, if I were you.

08-04-2005, 04:02 PM
Unfortunately, I don't know how to use Flash yet.


08-04-2005, 04:06 PM
If you really want to do this, I suggest you learn Flash or Java. To do this in DHTML would be difficult or impossible.

08-04-2005, 04:07 PM
Ok...thanks for your help anyway!


08-05-2005, 10:42 AM
Try these :p (hope it helps):

<script language="JavaScript" type="text/JavaScript">

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
<body onLoad="MM_preloadImages('your_mouse_over_picture_path.jpg')">
<a href="when_you_click_on_it_link.html" target="_self"><img src="picture_when_no_mouse_over.jpg" name="Name _of_the_pic" width="100" height="100" border="0"></a>

08-05-2005, 11:57 AM
No, this wasn't what s/he wanted to do.

08-05-2005, 04:37 PM
I think it is doable, the only thing he/she ll need to do is cut the picture in parts put rollover on parts he wants and than puzzle the pices back together. I did that myself once, and it is realy not that hard. But, yeah I agree with you flash would be the smartest choice.

08-05-2005, 05:28 PM
Not really practical, though, and it introduces a whole ream of other problems. Some graphics suites will even cut the image for you.

08-08-2005, 04:58 PM
I was useing Fireworks today and I think the best and easyest way to do what he wants is "Rectangle Hotspot Tool"

Read more here: