- [VOICEOVER] I'm going to show you a very nice effect that makes a drawer slide out from the top, bottom, left or right side of the screen when a button is tapped. It's a bit of work to create, but the results are worth it. In the exercise files folder open up the 03-04 slider begin file. I've created the frame that we want to slide in here on the page for you already, and begin by creating a clear frame over the areas that you're going to want to eventually be the tappable region, or the button that makes this work.
And then select that frame and the text frame, and group the two objects together. Next, take that group and copy it, and paste it in place twice. So now if you look at your layers panel, and twirl the MSO layer open, you'll see that you have three groups on that MSO layer. Next, you want to take two of the copies and move them to the start position. The easiest way to select just two of these three is to use the layers panel.
We can see that this top one is already selected, that's indicated by this red dot. If I hold down the shift key and click on the dot for one of the other ones, you'll end up with two of the three selected that way. And then just move those two to the starting position, where you want the objects to be before you tap the button. So up near the top, where just the banking for your business appears on the screen. Next, select all three groups and make a multi-state object by clicking on the new button in the object states panel, and we end up with three identical states, other than their positions are different.
And we want to rename these for clarity, this is important, as you'll see in a minute, so we want to name the first one Begin, the second state should be named End, and the last state should be named Middle. So they've got Begin, End, and Middle. Now you'll notice the begin and end look exactly the same. They're the starting position and the middle is the one that's pulled down. It might seem redundant to have both a Begin and an End state, but we're going to see that this is necessary in order to make the effect function properly if we're going to add animation to the states.
So, next we're going to wire up the buttons on each of these states. So select the Begin state, and then double click on the clear text frame, to dive down into the state, and get that frame selected, and we want to assign that the Go To State action and that should go to the middle state. So when you click on the Begin the button in the Begin state, you want it to go to the Middle state. Then hit the escape key a few times, to get the parent MSO selected again, go to the End state, select the frame on that state, and that should also be the Go To State action, and the End one should go to the Middle state.
Hit the escape key a few more times to get the parent MSO selected, again go to the Middle state, double click to drill down to the clear frame on that state, and that button should have a Go To State action and should go to the End state. So the Begin should go to Middle, the End should go to Middle, and the Middle should go to End. Alright, go ahead and preview it at this point, and it works, sort of, it sort of looks like what I showed you at the beginning, except that your brain is having to kind of imply the motion, and it doesn't have that smooth slide in animation that we're going for.
So, let's add that. Get the parent MSO selected again, and select the Middle state. And we want to select both the text frame and the clear frame that you created that's the button on this state, easiest way to do that is a layers panel and twirl everything open here, down to where you can see a button and a text frame, and then select one of those and shift-click to select the others, so you end up with both the button and the text-frame selected.
And we're going to animate these. Now it is important that you get those objects selected on the state, if you try to animate the state itself, you're going to get different results. So you need to get those two objects selected together. And then go to your animation panel, and choose the Fly In From Top animation preset, and then you want to animate to the current location, and then no opacity change. And then go to your timing panel, and select both objects listed in the timing panel, notice that the event says On State Load, so in other words the animation is going to happen when this state of the MSO loads in, and we want both of these objects to animate together, the button and the text frame, so click on this link icon on the bottom right corner, to play those two objects together.
And you'll see this little indicator right here that ties them together. Alright, hit the escape key a few times to get the parent MSO selected again, and go to the End state. And on the end state, we again want to select both the button and the text frame, and then go to the animation panel, you want to choose the Fly In From Bottom animation preset, make sure it says To Current Location and No Opacity Change. And then again go to the timing panel, select both objects by shift-clicking on them, and link them together.
That's it. Preview your work, and we have this real nice, slide-in, slide-out animation. This effect could be easily modified so that the objects slide in from the left, right, or bottom instead, making this a really flexible technique that can be adapted for a wide variety of uses.
- 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