Publishing and Exporting > Customizing HTML publishing templates > Creating an image map
Creating an image map
Flash can generate an image map using any image and maintain the function of buttons that link to URLs, even if another image is substituted. On encountering the $IM
template variable, Flash inserts the image map code in a template. The $IU
variable identifies the name of the GIF, JPEG, or PNG file.
To create an image map:
1 | In your Flash movie, specify the keyframe you'll use for the image map and label it #Map in the Frame panel (Windows > Panels > Frame). |
You can use any keyframe with buttons that have attached Get URL actions. | |
If you don't create a frame label, Flash creates an image map using the buttons in the last frame of the movie. This option generates an embedded image map, not an embedded Flash movie. | |
2 | In an HTML editor, open the HTML template you'll modify. Flash stores HTML templates in the Macromedia Flash 5/HTML folder. |
3 | Save your template. |
4 | Choose File > Publish Settings, click the Format tab, and select a format for the image mapGIF, JPEG, or PNG. |
5 | Click OK to save your settings. |
![]() |
As an example, inserting the following code in a template:
$IM <IMG SRC=$IS usemap=$IU WIDTH=$IW HEIGHT=$IH BORDER=0>
might produce this code in the HTML document created by the Publish command:
<MAP NAME="mymovie"> <AREA COORDS="130,116,214,182" HREF="http://www.macromedia.com"> </MAP> <IMG SRC="mymovie.gif" usemap="#mymovie" WIDTH=550 HEIGHT=400 BORDER=0>