Java Script Question

Browni

Registered
Hi Guys,

I've been working on a site re-design for www.adamswbrown.cjb.net. It it here, Adam Brown Online 3.5.

As you can see, its a simple but I think effective rollover site. However, I wanted to add a slight twist. I know that it is possible within either Java Script or HTML to set the opacity of an image, and to have that image change its opacity when the mouse is placed over it. I have searched the usual places, google, javascript source, etc and have come up with nought.

I am wondering wether it is possible to for example, the 'base' image with in the curve is the green ghost. When I rollover say the 'Art Work' text image the opacity of the green ghost is reduced to 0 and the opacity of the Art ghost is increased to 100.

I am aware that this would be much better done in something like Flash, but I nether have the time nor money to spend finding out how it works etc.

Is this possible? I would appreciate any help.

So far I have found out that,
Code:
style="filter:alpha(opacity=xx);-moz-opacity:0.3" onMouseOver="high(this)" onMouseOut="low(this)
controls the opacity of an image, how do I feed this into a rollover JS? Or am I going about this the wrong way? :confused:

Thanks,

Adam
 
Let me first say that you won't see the results either way, as the filter tag is a proprietary style for IE for Windows.

Let me next say "Huh?" What are you trying to accomplish, now? You want to change the opacity of the green ghost to 0 and change the art ghost's opacity to 100 when you rollover, instead of simply changing visibility or the src URL? If you want to change opacity, the best way is to make it look how you want in Photoshop, usually.
 
i wanted to accomplish instead of a simple change, a gradual fade from one ghost to another. As you say, the tag I found wont work, and Photoshop (well Image Ready) as far as I can see wont do this. Can you suggest another way?
 
You CAN set it up such that onmouseover it plays an animated GIF of the fade, which is on single loop, and onmouseout have it play another which works in reverse.

That always used to work for me. Make the GIFs in ImageReady, naturally.

Don't try and render this in real time in anything less than Flash.
 
Back
Top