Create an image map, Creating text and url reports – Adobe Flash Professional CS3 User Manual

Page 445

Advertising
background image

FLASH CS3

User Guide

439

See also

“Editing Flash HTML settings” on page 440

Create an image map

Flash can generate an image map to show any image and maintain the function of buttons that link to URLs. When
an HTML template includes the

$IM

template variable, Flash inserts the image map code. The

$IU

variable identifies

the name of the GIF, JPEG, or PNG file.

1

In your document, select the keyframe to use for the image map and label it

#Map

in the frame Property inspector

(Window > Properties > Properties). Use any keyframe with buttons that have attached ActionScript 1.0 or 2.0

getURL

actions.

If you don’t create a frame label, Flash creates an image map using the buttons in the last frame of the SWF file. This
option generates an embedded image map, not an embedded SWF file.

2

To select the frame to show the image map, do one of the following:

For PNG or GIF files, label the frame to appear as

#Static

.

For JPEG, during the publish operation, place the playhead on the frame to be used for display.

3

In an HTML editor, open the HTML template you’ll modify.

4

Save your template.

5

Select File > Publish Settings, click Format, select a format for the image map, and click OK.

For example, insert the following code in a template:

$IM

<img src=$IS usemap=$IU width=$IW height=$IH BORDER=0>

This might produce the following code in the HTML document that the Publish command creates:

<map name="mymovie">

<area coords="130,116,214,182" href="http://www.adobe.com">

</map>

<img src="mymovie.gif" usemap="#mymovie" width=550 height=400 border=0>

Creating text and URL reports

The

$MT

template variable causes Flash to insert all the text from the current SWF file as a comment in the HTML

code. This is useful for indexing the content of a SWF file and making it visible to search engines.

The

$MU

template variable makes Flash generate a list of the URLs that actions in the current SWF file refer to and

insert the list at the current location as a comment. This action lets link verification tools detect and verify the links
in the SWF file.

PNG width

$PW

PNG height

$PH

PNG filename

$PN

Attribute/parameter

Template variable

Advertising