Make buttons interactive



You can create, edit, and manage interactive effects in InDesign. When the document is exported to Adobe PDF or SWF, these interactive actions can be active.

For example, suppose you want to create a button that causes a sound to play in a PDF document. You can place the sound file in an InDesign document, and then create a button that causes the sound to play when you click the button in the PDF document.

In this example, clicking the mouse button is the event, and playing the sound is the action.

This button is set to play a sound when the mouse button is released.

Note: While most of the actions are supported in an exported PDF file, only a few of the actions are supported in a SWF file. Close, Exit, Go To Next View, Go To Previous View, Movie, Open File, Sound, and View Zoom have no effect in SWF files.

Add actions to buttons

You can assign actions to different events. For example, in an exported PDF file, you can specify a sound to play when the mouse pointer enters the button area, and a movie to play when the mouse button is clicked and released. You can also assign multiple actions to the same event. For example, you can create an action that plays a movie and sets the view zoom to Actual Size.

  1. Use the Selection tool  to select the button you created. See Create buttons.
  2. In the Buttons panel, choose an event, such as On Release, that determines how actions are activated.
  3. Click the plus sign button  next to Actions, and choose the action to assign to the event.
  4. Specify the settings of the action.

    For example, if you choose Go To First Page, specify the zoom. If you choose Go To URL, specify the web page address. Some actions, such as Go To Next View, do not have additional settings.

  5. If necessary, continue to add as many actions as needed to any event.
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.

Event types

Events determine how actions are activated in buttons when the document is exported to Adobe PDF. (In Acrobat, events are called triggers.)

On Release
When the mouse button is released after a click. This is the most commonly used event, because it gives the user one last chance to drag the cursor off the button and not activate the action.

On Click
When the mouse button is clicked (without being released). Unless you have a specific reason for using On Click, it’s preferable to use On Release so that users have a chance to cancel the action.

On Roll Over
When the mouse pointer enters the button area defined by the button’s bounding box.

On Roll Off
When the mouse pointer exits the button area.

On Focus
When the button receives focus, either through a mouse action or pressing the Tab key.

On Blur
When the focus moves to a different button or form field.

Action types

When you create an action, you indicate what happens when the specified event occurs—usually when someone clicks the button. You can assign the following actions to occur when the event type is activated:

Close (PDF)
Closes the PDF document.

Exit (PDF)
Exits the application, such as Adobe Reader, in which the PDF document is open.

Go To Anchor
Jumps to the specified text anchor. See Create jumps to text anchors.

Go To First/Last/Next/Previous Page
Jumps to the first, last, previous, or next page in the PDF or SWF file. Select an option from the Zoom menu to determine how the page is displayed.

Go To Previous View (PDF)
Jumps to the most recently viewed page in the PDF document, or returns to the last used zoom size.

Go To Next View (PDF)
Jumps to a page after going to the previous view. In the same way that a Forward button is available in a web browser only after someone clicks the Back button, this option is available only if the user has jumped to a previous view.

Go To Page (SWF Only)
Jumps to the page in the SWF file you specify.

Go To URL
Opens the web page of the specified URL.

Movie (PDF)
Lets you play, pause, stop, or resume the selected movie. Only movies that have been added to the document appear in the Movie menu.

Open File (PDF)
Launches and opens the file that you specify. If you specify a file that is not PDF, the reader needs the native application to open it successfully. Specify an absolute pathname (such as C:\docs\sample.pdf).

Show/Hide Buttons
Toggles between showing and hiding specified buttons in the exported PDF or SWF file. (Buttons are also referred to as fields in Acrobat.)

Sound (PDF)
Lets you play, pause, stop, or resume the selected sound clip. Only sound clips that have been added to the document appear in the Sound menu.

View Zoom (PDF)
Displays the page according to the zoom option you specify. You can change the page zoom level (such as Actual Size), the page layout (such as Continuous - Facing), or the rotation orientation.

Edit or delete button actions

  1. Use the Selection tool  to select the button.
  2. In the Buttons panel, do any of the following:
    • To deactivate actions, deselect the check box next to the item. Deactivating events and actions can be useful for testing purposes.

    • To change the order, drag and drop actions.

    • To delete an action, select the action in the list box, and click the Delete Selected Action button .

    • To edit an action, choose the event to which the action is assigned, select the action in the list box, and change the settings. If you need to replace a action for an existing event, delete the action, and then add the new action to the event.

Create jumps to text anchors

If you create a text anchor in an InDesign document, you can cause a button to jump to that anchor, even if it’s in another InDesign document. Use the Bookmarks panel and Hyperlinks panel to add text anchors. You cannot create jumps from buttons to bookmarks that aren’t text anchors.

Note: If you set a hyperlink destination to a button, the hyperlink will have no effect in the exported PDF or SWF document.
  1. Use the Selection tool  to select the button.
  2. In the Buttons panel, choose the event such as On Release that will trigger the jump.
  3. Click the plus sign button next to Actions, and choose Go To Anchor.
  4. Select one of the open InDesign documents from the Documents menu, or click the folder icon to the right of the menu and specify the file.
  5. Specify an anchor that was created using the Bookmarks panel or Hyperlinks panel.
  6. Select an option from the Zoom menu to determine how the page is displayed.
  7. Click Add to add the behavior, and then click OK.
Note: If you specify an anchor in a different document, remember to export that target document to PDF, and use the same filename as the InDesign document, replacing the INDD extension with PDF. Also, store the PDF documents in the same folder to make sure that the links remain valid in Acrobat and Reader.