Hi to you all!
Could anybody help me with that problem?
I have a mapped image and I want to change mapped parts of the image.
For example when I get a cursor over one area the image in that area would change for another (the same size of course).
Or for example I have mapped solar system and after clicking one of the planet the planet will change color (so the image will be switched just in that area).
Is that achievable?
Thanks a lot for your help!
Yes it's achievable, but I wouldn't do this with image maps. Image maps just use one single image for the background, with the <area> elements being clickable "hotspots" laid on top of the image.
I would simply have a background image in a DIV, then put all the planets in as individual images. Using CSS, position them absolutely, with respect to the DIV. Then using javascript it's a simple task to attach onmouseover and onmouseout event handlers to the images to change their src value.
Up until about 2005, maybe. Nowadays no, even IE6 can cope with absolute positioning without throwing a fit. What you want to do is not especially complicated. If you have a go at it, i.e. the HTML and CSS bits, I'll help you with the JS.
Bookmarks