HTML Rollover Map

Message Bookmarked
Bookmark Removed
How would you make an HTML rollover map with 3 states: normal, rollover and selected? Are rollovers always rectangular shapes? So how would one create rollovers with odd shapes butted right up against each other?

Can't be done, I say!

One case where Flash proves itself necessary?

Unfortunate Prankster (Unfortunate Prankster), Thursday, 26 May 2005 16:50 (twenty-one years ago)

Yes, this is the kind of thing Flash does best.

slightly more subdued (kenan), Thursday, 26 May 2005 16:52 (twenty-one years ago)

That and IMBEDDING FUCKING POPUPS.

slightly more subdued (kenan), Thursday, 26 May 2005 16:52 (twenty-one years ago)

I'm pretty sure you can do this with CSS...?

giboyeux (skowly), Thursday, 26 May 2005 16:53 (twenty-one years ago)

I don't know about the odd shapes, though.

slightly more subdued (kenan), Thursday, 26 May 2005 16:55 (twenty-one years ago)

You can do nonrectangular rolloever with partially transparent images, and absolute positioning. Javascript will let you handle the rollovers correctly.

But you don't want to do this. If you really need just a feature, it will take a lot of time in HTML, and will be a nightmare to get working correctly, and will be even worse to maintain. Use something else like Flash if you need to do this.

Rhodia (Rhodia), Thursday, 26 May 2005 16:56 (twenty-one years ago)

xpost

Yeah... I guess if your oddly shaped images are gifs with transparency behind them, positioned to the pixel next to each other, and then given hover states which would slide them behind one another... yeah, it could be done. I wouldn't want to spend all day figuring it out, though.

slightly more subdued (kenan), Thursday, 26 May 2005 16:57 (twenty-one years ago)

Thanks! I copied and pasted your replies to this client that's been asking me this same question since January. Keeps coming back to it as if I never answered before.

Unfortunate Prankster (Unfortunate Prankster), Thursday, 26 May 2005 17:27 (twenty-one years ago)

?? This is like, really easy to do..? Dreamweaver will do it all for you, even.

You can make rollover regions with 37-sided polygons if you really want..

if the map doesn't have many colors in it, I'd consider making the whole thing ONE image with different parts of itself highlighted.. use an imagemap program (or dreamweaver) and draw polygons on it to designate which areas trigger an image swap..

FLASH??

Tracer Hand (tracerhand), Thursday, 26 May 2005 18:26 (twenty-one years ago)

you might have to try layers
and ALOT of patience

josh w (jbweb), Thursday, 26 May 2005 19:13 (twenty-one years ago)

?? This is like, really easy to do..? Dreamweaver will do it all for you, even.

Yeah, but it will be the most CONVOLUTED, BLOATED, WRONGEST CODE EVER ON THE WEB. Not that it hasn't been done.

Flash is a much better, cleaner solution.

slightly more subdued (kenan), Thursday, 26 May 2005 19:18 (twenty-one years ago)

Dude you are high.

Tracer Hand (tracerhand), Thursday, 26 May 2005 19:20 (twenty-one years ago)

Rule is: if you need Dreamweaver to code it for you, it's bad code.

slightly more subdued (kenan), Thursday, 26 May 2005 19:21 (twenty-one years ago)

I don't need Dreamweaver to code it for me, but mycatisstaringatme sounds -- let's put this gently -- a little clueless about javascript and HTML, so I think he'd be better off getting Dreamweaver to do it for him than learning about arrays and the Document Object Model. And Dreamweaver's rollover code is actually surprisingly okay, I don't know why you imagine a page with generated rollover code is going to be any more "bloated" than a page which loads up a plugin.

Tracer Hand (tracerhand), Thursday, 26 May 2005 19:26 (twenty-one years ago)

I would say Flash or some other product would be best too, but we can't assume people making these pages have all these (if bought legitimitely, rather expensive) web development tools.

donut debonair (donut), Thursday, 26 May 2005 19:27 (twenty-one years ago)

And Dreamweaver's rollover code is actually surprisingly okay, I don't know why you imagine a page with generated rollover code is going to be any more "bloated" than a page which loads up a plugin.

It is okay, I agree. I'm just being a stickler. Flash is probably still easier to use than Dreamweaver, though. (I could be totally wrong about this, depending on the previous knowledge base.)

slightly more subdued (kenan), Thursday, 26 May 2005 19:38 (twenty-one years ago)

Flash is overkill for this (and most things actually).

Spencer Chow (spencermfi), Thursday, 26 May 2005 19:40 (twenty-one years ago)

I guess I just balk at how *ugly* Dreamweaver code is, and how veru obviously proprietary it looks.

And I like clean HTML, so a simple image embed is much better, to me, than a hundred line of HTML which do the same thing, only not quite as well.

slightly more subdued (kenan), Thursday, 26 May 2005 19:41 (twenty-one years ago)

Flash is overkill for this

How so? It's pixel-perfect, won't choke if you have javascript (or even images) turned off, won't break according to your browser's quirks, won't do anything wrong at all, actually, except not display if you don't have a Flash plugin. And how long does the average internet user go without installing a Flash plugin? I usually make it about two days on a new computer.

slightly more subdued (kenan), Thursday, 26 May 2005 19:43 (twenty-one years ago)

You can make rollover regions with 37-sided polygons if you really want..

Yeah, you're talking about HOT SPOTS ON AN IMAGE MAP, right? I'm talking about 3 images: a plain state, rollover state and a selected state. Dreamweaver will make HOT SPOTS for you but it won't do this... if so, please provide one example. I have been searching HTML maps for a while now and there is nothing out there.

Unfortunate Prankster (Unfortunate Prankster), Thursday, 26 May 2005 19:51 (twenty-one years ago)

PS. You don't have to put it gently. All I know of Javascript is how to swipe it and stick it in the code.

Unfortunate Prankster (Unfortunate Prankster), Thursday, 26 May 2005 19:59 (twenty-one years ago)

How so? It's pixel-perfect, won't choke if you have javascript (or even images) turned off, won't break according to your browser's quirks, won't do anything wrong at all, actually, except not display if you don't have a Flash plugin. And how long does the average internet user go without installing a Flash plugin? I usually make it about two days on a new computer.

That's all fine, but you're forgetting the minor issue that mycatisstaringatme needs to actually own or have a demo copy of Flash to do this. Even if this is a one-off thing, it's not even worth downloading a demo version of Flash for... which is around a 60 mb download these days. Maybe mycat has a T3 for all I know, though.

donut debonair (donut), Thursday, 26 May 2005 20:12 (twenty-one years ago)

Kenan, the problem for most people is that once you've designed their site in flash, they need a flash developer to update it. Also, so many flash sites force the user to figure out a whole new navigation scheme. Obviously flash is great for very specific applications (car and movie minisites etc), but it often allows designers to forget about good user interface design (or what users are unconsciously used to). Also, I always notice a load stutter on any site that employs any flash.

Spencer Chow (spencermfi), Thursday, 26 May 2005 20:17 (twenty-one years ago)

I am attempting to redo a map interface that was originally done in Flash because it needs to now be non-Flash... However, I don't know how to do it in any other way but Flash. I did not do the original map, though.

Unfortunate Prankster (Unfortunate Prankster), Thursday, 26 May 2005 20:31 (twenty-one years ago)

so many flash sites force the user to figure out a whole new navigation scheme. Obviously flash is great for very specific applications

I couldn't possibly agree more. But you're right -- for one thing, just a map with rollovers, just that one thing -- Flash is perfect.

slightly more subdued (kenan), Thursday, 26 May 2005 20:39 (twenty-one years ago)

I did not do the original map, though.

Either way, you're going to be rebuilding something. Solve some arguments here and tell us what tools you have at your disposal.

slightly more subdued (kenan), Thursday, 26 May 2005 20:42 (twenty-one years ago)

Oh I see! When you say "map" you mean the Rand McNally kind?

Do you want US states to turn red or blue or something when you roll over them? If so, can you please make Tennessee blue for me, it would be a personal favor.

Tracer Hand (tracerhand), Thursday, 26 May 2005 20:44 (twenty-one years ago)

States are what I was picturing all along. Correct me if I'm way off base.

slightly more subdued (kenan), Thursday, 26 May 2005 20:46 (twenty-one years ago)

Yes, the Geographic kind of map-- exactly 50 US States turning different colors: grey, dark blue and a medium gray. It's for taxes not rep/dem party graphics.

I have Flash, Dreamweaver, Illustrator, Photoshop, ImageReady, Fireworks and some other stuff that I don't know how to use very well like BBEdit and Freehand.

Unfortunate Prankster (Unfortunate Prankster), Thursday, 26 May 2005 20:49 (twenty-one years ago)

Awesome! Use Flash.

slightly more subdued (kenan), Thursday, 26 May 2005 20:52 (twenty-one years ago)

Kenan! Read thread.

Yeah this one's kind of tough, dude. My first instinct would be to use a single image of the entire map for each possible state, but you'd have to preload all those images and even compressing each one down to like 1K you'd still have to load up 100K worth of images, so I don't think that would work. (This is very confusing, since "state" and "map" both have two separate but relevant meanings here!)

Do you REALLY have to show the "selected" state for each region? Or do you get whisked away to another page once you click there? If you don't have to show that, then the above technique would work.

Tracer Hand (tracerhand), Thursday, 26 May 2005 21:03 (twenty-one years ago)

i.e. each image is the entire US, each showing a different highlighted state. map each state as a hotspot, and when you roll over the hotspot, the href calls the javascript function that swaps in the image of the entire US that highlights that particular state. make sense? just make sure to index each image to the same palette of, i'd say 8 colors at the most, possibly less, just make sure you include all the ones you'll need. and make sure to preload all of them.

it's pushing it, i realize, and it might possibly be too much to load up. i'd be interested to hear how others would do it.

there are probably good ways involving CSS, hiding layers, etc.

Tracer Hand (tracerhand), Thursday, 26 May 2005 21:17 (twenty-one years ago)

Kenan! Read thread.

?

Dude, I read the thread! he has Flash. Use Flash, I'm saying. Rebuild it from scratch if you need to -- sounds like he'd need to, anyway.

you'd have to preload all those images and even compressing each one down to like 1K you'd still have to load up 100K worth of images, so I don't think that would work

See? Use Flash.

it's pushing it, i realize, and it might possibly be too much to load up.

See? Use Flash.

slightly more subdued (kenan), Thursday, 26 May 2005 21:22 (twenty-one years ago)

(I'm not trying to be a dick or anything. But seriously, Flash is the easiest thing to use, and there's no really solid reason not to use it.)

slightly more subdued (kenan), Thursday, 26 May 2005 21:24 (twenty-one years ago)

I am attempting to redo a map interface that was originally done in Flash because it needs to now be non-Flash... However, I don't know how to do it in any other way but Flash. I did not do the original map, though.
-- Unfortunate Prankster (mycatisstaringatm...), May 26th, 2005. (Unfortunate Prankster)

Tracer Hand (tracerhand), Thursday, 26 May 2005 21:27 (twenty-one years ago)

i loathe flash and when I was dial-up I never jad the plug-in.

Miss Misery (thatgirl), Thursday, 26 May 2005 21:28 (twenty-one years ago)

xpost

OOOooohhhhhhh.


Wait.. Why does it need to be non-Flash? For who?

slightly more subdued (kenan), Thursday, 26 May 2005 21:37 (twenty-one years ago)

Threads like this explain why other threads can go on for 500million posts. Yeesh.

Trayce (trayce), Thursday, 26 May 2005 21:49 (twenty-one years ago)

Da United Stated Gubment doesn't want Flash or doesn't allow it for some reason on their Gubment-related websites.

Unfortunate Prankster (Unfortunate Prankster), Thursday, 26 May 2005 22:11 (twenty-one years ago)

> Da United Stated Gubment doesn't want Flash or doesn't allow it for some reason on their Gubment-related websites.

this'll be and accessibility thing. ever tried navigating around a flash based website with a braille reader?

koogs (koogs), Friday, 27 May 2005 08:06 (twenty-one years ago)

Word.

five-oh-whatever the fuck it is. WEB STANDARDS. A List Apart probably has an answer for you, I'm sure. Eric Meyers does amazing shit with CSS>

giboyeux (skowly), Friday, 27 May 2005 08:11 (twenty-one years ago)

Yeah I'd try and use CSS for this if at all possible. Relying on transparent gifs perhaps.

Sociah T Azzahole (blueski), Friday, 27 May 2005 08:39 (twenty-one years ago)

Cool. Maybe I'll submit it to him and he'll feel compelled to solve the problem. Thanks guys!

Unfortunate Prankster (Unfortunate Prankster), Friday, 27 May 2005 13:26 (twenty-one years ago)

And how long does the average internet user go without installing a Flash plugin? I usually make it about two days on a new computer.

My three-month-old PC doesn't have Flash, because Macromedia don't produce one which will run on it.

caitlin (caitlin), Friday, 27 May 2005 13:38 (twenty-one years ago)

Actually, doing some research, I'm exaggerating slightly, but the amount of effort involved is too much for me to be bothered with. I *could* install a version of Mozilla that's Flash-compatible, but to do so would involve doing a second, virtual, installation of all of the operating system libraries that Mozilla depends on. Oh, joy.

caitlin (caitlin), Friday, 27 May 2005 13:45 (twenty-one years ago)

I was thinking about this yesterday and my initial suggestion reminds me why I don't develop websites any more.

The real way to do it is with CSS layers and z-index positioning, I bet.

Tracer Hand (tracerhand), Sunday, 29 May 2005 23:19 (twenty-one years ago)


You must be logged in to post. Please either login here, or if you are not registered, you may register here.