|
|||||||||||||
All about Image MapsIn this section, we assume you already know the click here to go here and click there to go there dynamic of the World Wide Web. You probably also know that you can turn a graphic into a hyperlink just as easily as you can turn a string of text into one. Image maps bring another dimension to that dynamic. An image map is a graphic coupled with HTML instructions that describe how it should behave when clicked. Essentially, image maps have multiple hotspots, so that clicks on different places produce different results. At its core, the graphic for an image map is no different from any other exported graphic (so we refer you to the previous strategies for good output). Its the integration of the hotspot instructions that turns it into a more interesting creature.
One of our favorite image maps is devoted to Beatles trivia, and it is shown in Figure 22.2 (with the correct URL for fans who want to visit it). Each of the song titles, and the other parts of the label, represents a topic of discussion or interest, and clicking on any one of them takes you there.
This graphic is about 35KB, and thats not chump change in Web currency, but its bytes well-spent, because its clever, effective, and provides excellent navigation. Building an Image Map in DRAWAgain, an image map is a graphic with a set of instructions. Its not magic or voodoo, and we nonprogramming mortals can look under the hood on this one and understand whats going on. Keep the following key points in mind when creating an image map:
Figure 22.3 shows the graphic elements for a simple image map that a high school might create for its students. The cork board is one rectangle inside of a rounded rectangle, filled with a texture pattern called Oatmeal (we changed the color from that lumpy white to a corky yellow). The notices are just two more stacked rectangles, the one in back filled black and the one in front skewed ever so slightly. The thumbtack came from Corels clipart library. Finally, the text is Corels Technical.
In the following exercise through the creation of this image map, we have fabricated the URLs; if you want the hotspots to function, substitute ours with real ones. Here goes:
The next drop-down list is for creating a hyperlink to an element or page within your drawingthat is not relevant here. But the next five options are useful, and one of them is crucial. Here are descriptions of those options. Show Hotspots By clicking this, DRAW highlights the areas that have been defined so you can easily see them on screen, without having to laboriously select each object and consult the Internet Address window. Use Object Shape to Define Hotspot Conceivably, you might create an image map with very precise graphics for hotspots and you might want the object shape itselfand not the rectangular area it sits into be the hotspot. Most of the time, however, we recommend against this option (too bad its the default). If the object shape is unusual, DRAW will have to plot the entire shape, spinning out dozens of kilobytes of HTML code. This is classic file bloat. Use Bounding Box to Define Hotspot Choosing this option instead of Object Shape makes DRAWs job much easier, and the jobs of those who visit your page. All DRAW has to do now is define a simple rectangle for each hotspot, which it can do in about six words of HTML. Only an extraordinarily shaped graphic would truly need more than a rectangle to have its hotspot defined, and most of the time your visitors will appreciate being able to click a bit more lazily. With our high school corkboard, using the object shapes as hotspots resulted in an 18KB HTML file. Using the bounding box brought that number all the way down to 4KB. Foreground and Background Colors of Hotspot Only relevant if Show Hotspots is clicked, this determines how the hotspot appears. Choosing a background color seems only to blanket the entire hotspot with a solid color; choosing a foreground color makes more sense, as we have done here. Select each notice on the bulletin board and enter a URL for it. We used http://www.rhs.com/ for the main address and sports, seniors, government, and yearbook to complete the URL for each of these four links. You can use any URLs you want to, including corel.com, altman.com, sybex.com, or your own Web site.
|
|||||||||||||
|