Create button hot spots



In some cases, you may want the button area (called a “hot spot” or “hot link”) to be invisible until the mouse pointer is moved over it. For example, when you move a pointer over a button on a map, an image could be displayed that represents a region, and the image could disappear when the pointer moves away from the region.

In the exported PDF file, holding the pointer over a hot spot causes an image to appear.

Display a hidden image on rollover

One way to achieve a “hot spot” effect is to apply an image to the Rollover state in the States panel. To do this, create a button in which the [Rollover] state displays an image while the [Normal] state doesn’t display the image.

  1. Select the image you want to use as a hot spot. Make sure the frame of the image does not have a border or background.

  2. In the Buttons panel (choose Window > Interactive > Buttons), click the [Normal] state to convert the selected image to a button.

  3. Click the [Rollover] state in the Buttons panel to activate it.

  4. Click the [Normal] state again. Then select the image using the Direct Selection tool  and delete the image.

    Make sure you delete the image (the contents of the frame), not the frame and contents. Deleting the frame would delete the entire button.

  5. To preview the hot spot effect, export the image to PDF or SWF and move the mouse over the area where the image should appear.

To test the button, export the document to PDF or SWF, and view the exported file. If you’re exporting to PDF, make sure that the Interactive Elements option is selected. If you’re exporting to SWF, make sure that Include Buttons is selected.

For a more detailed description, see http://blogs.adobe.com/indesigndocs/2009/01/two_ways_to_create_button_hot.html.

Display a different button on rollover

You can create a hot spot in which clicking or mousing over an object displays another object. To do this, create two buttons, hide one of the buttons, and use the Show/Hide Button action to show and hide the target button.

  1. Create an object to be used as the source button. In the Buttons panel, click the [Normal] state to convert it to a button.
  2. Place the image you want to be used as the target button. In the Buttons panel, click the [Normal] state to convert it to the button.
  3. Select the target image and choose Hidden In PDF from the Buttons panel menu.

    The image needs to be hidden is the PDF document so that it can be displayed when the source button is moused over or clicked.

  4. Select the source button and create two different actions, one to show the target image and a second to hide the target image.

    If you want the image to appear when the mouse hovers over the source button, use the On Roll Over and On Roll Off events. If you want the image to appear when you click the source button and disappear when you release it, use the On Click and On Release events. If either case, use the Show/Hide Buttons action to display and hide the target button. See Make buttons interactive.

To test the button, export the document to PDF or SWF, and view the exported file. If you’re exporting to PDF, make sure that the Interactive Elements option is selected. If you’re exporting to SWF, make sure that Include Buttons is selected.

For a more detailed description, see http://blogs.adobe.com/indesigndocs/2009/01/creating_button_hot_spots_part.html.

Hiding and printing buttons

You may want to hide a button so that you can display it only when you click a different button.

  1. Use the Selection tool  to select the button.
  2. From the Buttons panel menu, choose an option to specify whether you want the button to be visible or invisible in the exported PDF document, and whether you want the button to be printed.