Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
One of the most commonly requested interactive behaviors I hear people asking for is, how do I make an object appear or disappear on the page? For example, I have three pieces of art in this document: one on my page, and then a couple out here on the Paste board. I'll just drag those on. Now, you can see that these are actually groups of objects. I've grouped the image with a caption, so, it'll act as a single object. But I only want one of these to be visible at a time. The other pieces of art should be hidden until I click on one of these buttons along the left edge here. Now, this seems impossible to do in InDesign until you learn one really simple trick.
You need to turn all of these objects into buttons. InDesign can only hide and show another button. So, I'm going to select all of these objects. I'll just drag a marquee with a Selection tool over all of these text frames and these groups, then I'll head over to my Buttons and Forms panel, and I'll click on the Mega Button button. Now, each one of those objects, the groups and those text frames are a button. I'll click out here on the Pasteboard to deselect, and then I'll click on one of these buttons up here. Now, this button doesn't have to do anything.
No event, no action, but I do need to give it a name. I'm going to come up to the Name field, select that, and delete that text and instead I'll call it Blue Cliffs. That's the name of this piece of art. Now, I'll click on this one over here and I'll call it Apple Wood. And then finally, the third group, I'm going to call that button Vines. As you'll see in a minute, it's really important that you name these buttons carefully so that you can identify them. And now that we've named them, let's go ahead and setup these buttons over here. I'm going to call this first one Show Vines.
And here's the action I'm going to apply to it. On release or tap, I want the action to be Show Hide Buttons and Forms. And as soon as I select that, you'll see that the Buttons and Forms panel expands, and it gives me a list right here in the middle of all the buttons on my page. The trick to showing or hiding buttons on the page is to click on this left column. So, for example, I want to show vines, so, I'm going to click once on that X. You'll see that the X turned into a little eye ball, that means show this button.
If I click twice on the Apple wood, first, I get the eye ball then I get an eyeball with a line through it. That means hide this object. I'm going to do the same thing to Blue cliffs. So, now, when I click on the Show Vines button, it's going to show the vines artwork, and it's going to hide Apple wood and Blue cliffs. Now, let's do the other two. I'll choose Apple wood, I'll give it an action. This one is going to hide the Vines and hide Blue cliffs, but definitely show Apple wood. And let's give it a more descriptive name.
And lastly, the Blue cliffs. Show Blue cliffs artwork, and the action is going to be Show/Hide buttons. And this was going to show the Blue cliffs and hide the other two. Now, I need to do one more thing here, and that is to select each of these objects, and set the hidden until triggered check-box. I'll start with this first one, Blue cliffs. I'll select it, and then turn on hidden until triggered. And that way, when I open the PDF in Acrobat, it will be invisible until it's told to become visible. Let's do the same thing to this second piece of art. Make it hidden until triggered.
The third piece of art, I'm going to leave alone, because I do want that visible when I first get to that page. Now, all I need to do is drag these objects into position. I'm just going to position them by dragging them around until I get them into the right place, one on top of the other. I'll press Cmd+Shift+Return or Ctrl+Shift+Enter to open the SWF preview panel, and we're going to test out these buttons. When I click on the Apple wood button, it switches to that artwork. When I click on Blue cliffs, it switches to that. Then I'll go back to Vines, and you can see it switches to that.
So, the actions work great. Just in case you jumped right into this movie and haven't heard me say this a few times before, buttons do not work reliably in most tablet PDF readers at this time, on Android or IOS devices. So, this hide and show trick may not work on those devices.
Get unlimited access to all courses for just $25/month.Become a member
119 Video lessons · 51427 Viewers
117 Video lessons · 39272 Viewers
113 Video lessons · 81756 Viewers
65 Video lessons · 12077 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.