Join Keith Gilbert for an in-depth discussion in this video Create a reveal button, part of InDesign: Fixed-Layout EPUB Interactive Techniques & Publish Online.
- Reveal, or pop-up buttons are another very common interface element that appears in digital publications. They are very useful. They can lead a curious reader deeper into your content, allow you to display dense content in a small amount of space, provide a mechanism for creating simple games and quizzes and much more. In this movie, we're going to see how to create a button that when tapped reveals more information. Then, when the user taps the 'close' button, the information disappears.
There are several ways to do this, but the method I am going to show you is a very flexible method that adapts to a wide variety of layout challenges. In the Exercise Files folder, open 03_01_reveal_begin. If you look at the Layers panel, you'll see that there's an MSO layer that's been created and on that layer is a group, and in that group is close button, artwork, and a text frame. We're going to begin by drawing a clear frame that will eventually become a button, right over the close button artwork.
Let's draw the frame the size you want the tapable region to be. We want to add that button to the group that is this text frame and close button artwork group. We can do that easily by using the Layers panel. All you need to do is grab this square in the layers panel and drag it down into the group that's flipped open here. We want to make sure that that ends up within the group on the top level of that group, above the close button artwork. Then move that group out of the way temporarily and draw another clear frame that covers North America.
This frame is eventually going to become the tapable region, the open button that opens this reveal button information. Then slide the North America group back where you want it to eventually be when it opens. Next, select both pieces, the group and the clear frame that covers North America and make a new multi-state object by clicking on the 'New' button in the Object States panel. Go ahead and name State 1 'Hidden' and name State 2 'Visible.' Then name the MSO 'North America MSO.' It's always a good idea to name your objects and your states.
You never know how complex things might get later on, as you start to change your mind and it's really helpful to have things named clearly. Now we have a hidden state and a visible state. All that remains is to wire up the buttons to make this active. To do so, select the visible state and simply double-click on the clear frame that's going to be the close button and assign the Go To Next State action to that frame. Then to crawl back up out of that selection, back up to the parent multi-state object, hit the escape key two or three times, until you get the heavy dotted outline that indicates you have the parent MSO selected.
Then click on the hidden state, double click on the frame to get the frame within the state selected and assign the Go To Next State action to that frame. That's all there is to it. Before we duplicate this to South America, Africa, Europe, et cetera, we'd better check our work. We'll use the EPUB Interactivity Preview panel to do that and click on North America and the text frame should appear. When you click on the close button it should disappear. It's so important to check your work after you create one of something, before you duplicate it and make a whole bunch of copies.
If there's a problem, you want to catch it early. Now we just want to select this multi-state object and option or alt drag it onto Africa, and then rename the duplicate as Africa MSO, select the hidden state, double click to drill down to the frame within the state, and adjust the boundaries of that frame so that they cover Africa properly. Hit the escape key a few times to crawl back up to the parent MSO, select the visible state and move that group wherever you want it to display once it's tapped and double-click a couple times to get North America selected and change it to Africa and edit any other text there that you wish.
Then you would repeat that process by duplicating that MSO to Asia, Europe, Australia, and South America. After you're done, one other little thing you might want to check would be to select each MSO and select the visible state of each MSO so that they are all displayed at once, so you can check to make sure they're not colliding with each other once they're open, make sure they're not overlapping each other, and if they are, maybe adjust where they land a little bit. Then when you're done, you can either click on each one and click on the hidden state to hide it individually or you can go up to the menu in the Object States panel and choose Reset All Multi-State Objects to First State.
That will close them all, which is kind of the starting point where it's going to begin. Once you learn how to create these reveal buttons, I suspect that you'll find lots of places to use them in your interactive document.
- Creating animated navigation buttons
- Building interactive slideshows
- Creating reveal buttons
- Adding multiple choice and branching quizzes
- Creating a scrolling panorama
- Embedding video
- Creating buttons to send email