Interactive buttons in InDesign allow you to add all kinds interactivity to documents that you export to PDF, fixed-layout EPUB, and Publish Online. A button can be used to navigate to different pages or specific content on a page, it can play movies, sounds, and animations, and it can even show and hide buttons, including itself. They can also have multiple appearance states for rollover effects. In this movie, Mike shows how to create and manage buttons.
- [Instructor] You can add kind of interactivity to documents that you export to PDF, fixed-layout EPUB, and publish online with buttons. A button can be used to navigate to different pages or specific content on a page, it can play movies, sounds, and animations, and it can even show and hide buttons, including itself. So let's take a look at working with buttons and use them to add some interactivity to an artist's portfolio. In the exercise file for this movie, we have a one-page document with the artist's name over here on the left and we have titles of three paintings, right here, and pictures of each painting with captions.
And some of them are over here on the pasteboard. Now I'd like to fit all the paintings on this one page but if I make them small enough to all fit you wouldn't see a lot of detail and they'd be a lot less impressive. This is a problem you can solve with buttons because they allow you to control the visibility of each painting and show just one of them at a time. To start I'll select the first painting and in the Buttons and Forms panel I'll click down at the bottom to convert the selected item into a button. And I'll give it the name of the painting, which is Blue Cliffs, Jade Sea.
Notice when you have a button selected you'll see a dashed border that's thicker than what you normally see when you have something selected in InDesign. When you convert an object or a group into a button the button acts as a container around everything. So to select an item inside a button, I can double click on this painting to select it. So remember that buttons act as containers for objects or groups. The second important thing to understand is that buttons can have more than one appearance state. If I click off and then select the button again you'll notice in the Buttons and Forms panel this Appearance section.
And I can have three Appearance states, Normal, Rollover, and Click. Initially, there's only one state in a button. But I can add a Rollover or a Click state just by clicking on them here. When I do that, it's like I duplicated the objects in the normal state, and now I can manipulate these new copies independently of the originals. Now in this case, I'm not gonna need different appearances for the paintings, so I'll just undo, to just get back to the normal state. Now you can add objects to a button state by using the Past Into command or the Layers panel.
So for example, to add this caption to the painting, I could select it, cut the text frame, select my button, and then choose Edit, Paste Into. Notice how it didn't stay in the same location it's now centered inside the button here. If that's a problem, there's a different method we can use. I'll just undo a few times, to get the caption back where it was. And then go to the Layers panel, and locate this text frame and then drag it into the Normal state of the button.
So here's the selected item. If I tip open my button, I can see the Normal state, and I can click and drag the caption in there. Now if I select my button, I can see that the caption's included. Note that you can only add an object to the current state. There's no way to add an object to all button states at once. Though since there are only three potential states for a button, Normal, Rollover, and Click, it isn't too hard to just repeat this Paste Into or Layers panel process for each state.
Now let's take a quick tour of the controls in the Buttons and Forms panel. At the top of the panel, there's a Type menu, where we can choose a regular button, or one of several form fields. We'll cover forms in a later movie. Under that there's a field where you can name a button, which we already used. Names are very important for buttons because you almost never create just one button in a document, so in order to know which button is which, you need to have some descriptive names. Below that, there's an Event menu, where you can choose which triggering event will make something happen, so we have On Release or Tap, On Click, On Roll Over, On Roll Off, and On Focus and Blur for PDF.
Below that we have Actions. Actions are what will happen when the trigger event occurs. Buttons don't have to have actions, but if you intend for people to interact with a button by clicking on it or mousing over it, then you have to have an action. And, actually, clicking this plus sign, right here, and choosing an action, is a cool shortcut for creating a button. You can also have a button hidden by default by selecting this option here. And that way it will only appear when you want it. This can be very useful, as we'll see shortly.
To convert a button back to an object, you click the button at the bottom of the panel, right here, Convert to Object. And there's also an option to add a description that will appear as a tool tip when someone mouses over the button in a PDF, by filling in this field here. And there's an option to make a button printable or not. Okay so now that we've seen some of the basic ideas about buttons and the panel, let's make some buttons to interact with this portfolio. I'll select the button that I created earlier, Blue Cliffs, Jade Sea, and then in the Buttons and Forms panel, I'll select the option Hidden Until Triggered.
I'll scroll over the pasteboard. I'll select the second painting, which is grouped with it's caption, and convert that to a button, and name it Tiger Lily. And I'll select Hidden Until Triggered. And I'll select the third painting, convert it to a button, and this one will be named Prism Shield. And again, select Hidden Until Triggered.
I'll scroll back to the left, select the top text frame where it says Prism Shield and from the Actions menu in the Buttons and Forms panel, I'll choose Show/Hide Buttons and Forms. I'll give this the name Show Prism Shield. So the Event will be On Release or Tap, Show/Hide Buttons and Forms. I'll select the second text frame. Go to the Actions menu, Show/Hide Buttons and Forms, and we'll call this Show Tiger Lily.
And select the third frame. Again Show/Hide Buttons and Forms and we'll call this Show Blue Cliffs, Jade Sea. Now let's move the paintings into position on the page by selecting all three and using the Align panel to align the left edges and top edges. So I'll Shift + Click to select all three. Open the Align panel. Click once on the leftmost painting to make that the key object.
Align left and align top. Now with all the buttons in place, we're about to see why it's so important to name your buttons. Select the Show Prism Shield button and in the panel Visibility Settings, we'll click to set the visibility of the other buttons. So we'll click once on Prism Shield to show it, which I can tell by the eye icon here. Then we also want to make this button always hide the other paintings. So I'll click twice on Blue Cliffs, Jade Sea.
And you can see the slash through the eye. And I'll click twice on Tiger Lily. I'll leave the other buttons alone, so clicking or tapping on this button won't do anything to them. I'd also like to add a Rollover appearance so that the color of the text changes when someone rolls over it. So I'll click once on the Rollover state. And then double click to select the text frame. Then I'll use the Swatches panel to set the text fill color to the color purple.
Target the text and choose purple. Now let's repeat the process for the Tiger Lily button. So back to the Buttons and Forms panel. Select Tiger Lily, go to Visibility, and this is gonna show Tiger Lily, it's gonna hide Blue Cliffs, Jade Sea, and it's gonna hide Prism Shield. We'll add a Rollover state. Double click to select the text frame. Go to Swatches, target the text, and color it purple.
And lastly we'll select the third button. Go back to Buttons and Forms. And this is gonna show Blue Cliffs, Jade Sea. It's gonna hide Tiger Lily, and it's gonna hide Prism Shield. Add the Rollover state. Double click to select the text frame, target the text, and apply the purple swatch. Okay let's Export to PDF and see how our buttons work. I'll just press Command or Control E, Export to the Desktop.
Choose Format Adobe PDF (Interactive) and click Save. I'll leave the options as their defaults but I'll make sure View After Exporting is selected. And click Export. Here's my PDF. As I mouse over each one of the titles, I can see the color of the text change, and I can click to view the paintings. So here we saw how to use buttons to make something like this artist's portfolio interactive. Buttons are great tools for adding navigation controls, as well as for showing or hiding content in a PDF, fixed-layout EPUB, or publish online document.
You can choose which event triggers a button's actions, and you can also set changes in appearance that occur when someone rolls over or click on a button.
- Overview of interactive document types, including PDF and EPUB
- Creating interactive objects
- Setting up hyperlinks, cross-references, and a table of contents
- Working with media
- Publishing documents with Publish Online
- Creating EPUBs
- Following workflows for interactivity: interactive PDF, reflowable EPUB, and fixed-layout EPUB