|
|
Macromedia Fireworks Image Map Tutorial
You are here: irt.org | Articles | JavaScript | Image | Macromedia Fireworks Image Map Tutorial Published on: Sunday 3rd October 1999 By: Martin Webb IntroductionWhen the software arrived, it contained one CD-Rom, one 134 page "Using Fireworks" guide, one registration card and a small brochure. It sat on the desk for ages before I eventually got around to looking at it in more detail. Looks can be deceiving. This is an extensive graphics package with HTML capabilities thrown in. Macromedia Fireworks is not a bit image graphic package, but object based. This may take a while getting use to, for those who are not familiar with object based graphics tools. Object can be layered over one another, manipulated independently or grouped together, and even after saving, using Macromedia Fireworks .png file format can be reloaded and manipulated further. When first started you are presented with a widget heavy window. See the Screen Shot. Macromedia Fireworks is a complicated piece of software, that can't possibly be given justice in one superficial tutorial, its many capabilities include:
This tutorial will concentrate on only one of these features... Image MapsAn image map consists of an image and an image map. The image map defines different hot spots within the image. These hot spots each have a URL associated with them. When the mouse pointer is clicked on one of these hot spots, then the browser loads the associated URL. The hard part is defining the area that each of these hot spots covers - using rectangle, circle and polygon shapes. The rest of this tutorial will demonstrate how easy this is to do. 1. Create or open a source graphic on which to place a hotspotI'm not an artist so I'll be using the existing irt.org logo (zoomed to 200%) with Macromedia Fireworks:
2. Choose a URL basic shape tool from the URLs toolbarThe URLs toolbar is located at the top of the main document window:
The four icons from left to right are:
3. Create a hotspot region by dragging a URLs shape toolI first selected the rectangle URL Tool and dragged a rectangle hot spot over the letter "i":
The four corners of the hot spot can be selected and adjusted once you've selected the URL Pointer Tool. This allows you to refine the hot spot area. I then used the Polygon URL Tool and clicked the mouse button around the edges or the letter "r" to create several points, before finally clicking the first point to close the shape:
It was then fairly straight forward to repeat this operation over the remaining letters. Note that it is not possible to use the URL Tools to create an area with a concave shape. If this is required then you' would have to make smaller individual hot spots.
4. Choose New Link from the URLs toolbar Options pop-upFirst select one of the hot spots, I selected the letter "i". and then select the arrow icon on the far right of the URL Toolbar. A menu is displayed, showing several different options:
Selecting the "New Link..." menu option opens up the "Link Info" dialogue box. 5. Enter a URL to which the hotspot will link, enter a browser status bar message, and enter a targetThe Link Info dialogue box allows you to enter the URL to be associated with the selected hot spot, a message text to be displayed in a web browsers status bar, and an optional target (None, _blank, _self, _parent and _top) which refers to the browser window that the URL should be loaded into:
6. Optionally, click the Overlay Color color well and choose an overlay color to organize hotspots by colorThe overlay color allows you to see show the different hot spots in different colors - used in Macromedia Fireworks, but not in the final image. Clicking the Overlay Color opens up a typical Color Picker dialogue box (not shown here). 7. Click OK in the Link Info dialog boxClicking OK completes the setting of the currently selected hot spot:
You can then repeat steps 4, 5, 6 and 7 for all of your remaining hot spots:
8. Selecting the type of image map to generateWe need to select the type of image map to be generated (Client-Side or Server-Side). From the URLs toolbar Options pop-up, select the Image Map Options... menu item:
This then opens up the Image Map Options dialogue box:
This allows you to generate HTML and JavaScript code for a Client-Side image map, or the map file used by a Server-Side image map. 9. Exporting the image and map codeBy default Macromedia Fireworks saves your work as .png format files. This allows you to reload and continue your work from where you left off. However, you'll need to export you work to a .gif or .jpg image file and also any additional HTML files. When you select the Export option from the Save As... menu option you'll eventually be presented with the following Export dialogue box. It is important to tick the Generate HTML option box, otherwise any HTML or JavaScript code associated with your Image Map, or Image Rollovers or Sliced Images will not be generated:
This then generates the irt.gif image, along with an irt.htm file containing the HTML and JavaScript code required to operate the Client-Side image map and an irt.map file which can be used on your server to operate the Server-Side image map.
I would also recommend saving your work as a native Macromedia Fireworks .png format file, so that you can rework the image maps that you created later on, without having to manually adjust the generated HTML and JavaScript code. Working ExampleThe final result of my work is shown below:
There is one small bugget with the code generated, and that is the small hypertext space visible to the right of the image in some browsers. This is caused by the way the image link is wrapped with anchor tags over three lines. The code Macromedia Fireworks produces is shown below:
whereas, to avoid this unsightly hypertext link, the code should be produced as:
This then avoids the browser including an empty space between the image and the closing anchor tag. Example FilesThree files can be generated depending on the options chosen from the Image Map Options dialogue box, the .gif image, shown above, the .htm file:
and an optional .map file:
ConclusionMacromedia Fireworks, is a complicated piece of software. It is a graphics package that enables the easy creation of graphics suitable for the web. It can ease the creation of Image Maps, Image Rollovers and Spliced Images - things which novice web authors find difficult to get to grips with. It is not as sophisticated as Macormedia Dreamweaver, but then it is primarily a Graphics package. We have only touched the surface on the capabilites of what Macromedia Fireworks can offer, but I hope you can see that it is an extremely professional and capable piece of software. The Using Fireworks guide included with the CD-ROM is extremly well laid out, with many, mny examples of how to generated images, sitll or animated, concentrating on creating images for a web page. Many of the images are included on the CD-ROM, which will enable you to quickly get up to speed with the tutorials. Feedback on 'Macromedia Fireworks Image Map Tutorial'
View the profile on Martin Webb and the list of other Articles by Martin Webb. |
-- div -->
|