Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design

  • Print
  • + Share This
This chapter is from the book

Creating Buttons

Buttons are more powerful than simple hyperlinks. Buttons contain the code that can send you to destinations, flip pages, open Web pages, play movies, show and hide other buttons, and other tricks.

You use the Buttons and Forms panel to create and apply actions to Buttons.

To view the Buttons and Forms panel:

Choose Window > Interactive > Buttons and Forms to open the Buttons and Forms panel squ_d.jpg.

423fig01.jpg

squ_d.jpg The Buttons and Forms panel for a selected button.

To create and name a button:

  1. Select an object. Any object, except media files, can be used as a button.
  2. Choose Object > Interactive > Convert to Button or click the Convert Object to Button icon in the Buttons and Forms panel squ_e.jpg. The object displays the button icon squ_f.jpg.
    423fig02.jpg

    squ_e.jpg The Convert Object to Button icon at the bottom of the Buttons and Forms panel.

    423fig03.jpg

    squ_f.jpg The Button icon appears inside an object that has been converted into a button.

  3. Use the Name field in the Buttons and Forms panel to change the default name to something more descriptive.

If you need to, you can remove the button properties from an object.

To remove the button properties:

  1. Select the button object.
  2. Choose Object > Interactive > Convert to Object or click the Convert Button to Object icon in the Buttons and Forms panel squ_g.jpg.
423fig04.jpg

squ_g.jpg The Convert Button to Object icon at the bottom of the Buttons and Forms panel.

A button without an action is like a light switch that’s not connected to a lamp. You can click the button all you want, but nothing’s going to happen. There are two parts to setting actions. First you choose the type of event that will prompt the action.

To choose the event for a button action:

Use the Event menu to choose what type of mouse or keyboard action should prompt the button to perform the action squ_a.jpg.

  • On Release or Tap applies an action under two circumstances: when the mouse button is released after a click or when a tablet screen is tapped.
  • On Click applies an action as the mouse button is pressed down.
  • On Roll Over applies an action when the mouse cursor is moved over the button’s bounding box.
  • On Roll Off applies an action when the mouse cursor is moved away from the button’s bounding box.
  • On Focus (PDF) applies an action when the button is prompted by the Tab key. This event only works for buttons in PDF documents.
  • On Blur (PDF) applies an action when the Tab key takes the focus off the button. This event only works for buttons in PDF documents.
424fig01.jpg

squ_a.jpg Use the Event list to choose which mouse actions will prompt a button action.

Once you have chosen the mouse event, you then choose the action that follows the event.

To choose the action for a button event:

  1. Click the Add New Action icon from the Actions area of the Buttons and Forms panel squ_b.jpg. This displays the Actions menu squ_c.jpg.
    425fig01.jpg

    squ_b.jpg The Actions area displays the actions for each mouse event.

    425fig02.jpg

    squ_c.jpg The Actions menu in the Buttons and Forms panel.

  2. Choose the action that you want to apply. The action appears in the Actions area of the Buttons and Forms panel.
  3. Depending on the action, additional controls may appear in the Buttons and Forms panel. Set those controls as necessary.
  4. If desired, you can apply more actions to the button by repeating steps 1–3.

To delete the action for a button event:

  1. Select the action in the Actions area.
  2. Click the Delete Action icon.

If you have multiple actions for an event, the actions are applied in the order that they appear in the list. You can change this order of how the actions are applied.

To change the position of an action:

Drag the action up or down in the Actions list.

One of the benefits to working with buttons is the ability to change the appearance so that the button itself responds to the actions of the user. When you create a button, it only has one appearance called the Normal state. You need to create new appearances for the Rollover and Click button states.

To set the appearances of a button:

  1. Select the button. Unless you have already modified it, only the [Normal] state is active in the Buttons and Forms panel squ_a.jpg.
    426fig01.jpg

    squ_a.jpg The States in the Buttons and Forms panel.

  2. Click the [Rollover] state listing in the Buttons and Forms panel. This activates the state.
  3. Click the [Click] state listing in the Buttons and Forms panel. This activates the state.

To make changes to each appearance state:

  1. Select the button you want to modify.
  2. In the Buttons and Forms panel, select the state that you want to modify.
  3. Use any of InDesign’s styling features to add a fill, stroke, or effect to the object. Use the Type tool to insert text as a label. You can also insert different images for each state.

To delete button states:

  1. Select the state you want to delete.
  2. Click the Delete State icon squ_b.jpg.
426fig02.jpg

squ_b.jpg The Delete State icon in the Buttons and Forms panel.

Instead of deleting states, which tosses out their content, it may be better to change whether or not the state is exported.

To change the visibility of a state:

Click the eyeball next to the name of the state. If the eyeball is visible, it means the state is enabled and will export. If the eyeball is not visible, it means the state is disabled and will not export.

  • + Share This
  • 🔖 Save To Your Account