- You can include animated objects in individual states in an MSO as we've seen in another video. If your animated objects have one animation applied to individual objects, the process is pretty straightforward. You just make an MSO. But if you have to apply an animation to a group, it turns out there's a little trick involved. Let's take a look. I'm going to show you this page in the preview panel. Here, we have a button that's set to Go to Next State. Each state fades in and then moves objects over.
Fade in, and move over. These require grouped animations. And they require a little bit different treatment in an MSO in order for them to work. Let me show you what I mean. I'm going to go to the next page of this file where some of my objects are not yet animated, and nothing has been put into an MSO. I'll go to the Layers panel, and I'm going to isolate one of these groups of animations. I'm going to hold down the option or alt key, and click on the Exercise layer. And here we have two objects that aren't animated yet.
I'm going to click on each one, and set the first animation, which is to Fade In. Then, I'm going to group the two objects together. Command or control+g, and I'm going to set that group to move right. There's my grouped animation. Now, let's turn everything back on here, and put this in an MSO. I'm going to select the exercise group, hold down the shift key and the Team group, and hold down the shift key in the Swing group.
And now I'll make these into an MSO. I'm opening the Object States panel, and clicking on new object state. So there are my various states. Now, I'll hook up this button. I'll click on my little question mark, which is going to be my button, and open the Buttons and Forms panel. I'll create the button, and the action I want is Go to Next State. This button is just going to cycle through each state of the MSO. So, let's take a look.
When I click on the button the objects fade in, but they don't move. If I go to the next state, again, the MSO part is hooked up, but that grouped animation just isn't functioning. Let me show you the trick to make that work. I'm going to go to the next page in the file where all my animations are already set up. Each pair of objects is set to fade in then move over. Here's the trick. In order to make this work, we actually have to make an MSO that has three empty states in it, and then put our animation inside of that.
I've got a layer ready to do that called MSO, and I'm going to isolate it by holding down the option or alt key and clicking on the visibility icon. The key about these empty states is they have to be large enough to accommodate the animation, including its motion path. So I've put some guidelines down here to indicate the right size. I'll draw one rectangle, and then I'm going to duplicate it using Step and Repeat. I'll set the Offsets to zero and zero, and make two copies.
Now I have these three rectangles, and I can name them or not, It's not really necessary at this point. What I'm going to do is turn these into an MSO. So with these three empty rectangles selected, I'll open my Object States panel, and create a new multi-state object. Now, let's turn back on the other elements on the page. Now, one by one, I'll go through and put these animations inside each empty state. And here's how we do it. First, I'll select the Swing animation.
And I'm going to cut using command or control x. Now, I'm going to go back to the MSO, open the Object States panel, and now I'm in State 1. Here's the trick. I'm going to use Paste Into, and put that first animation in the first state of the MSO. I'll go back and pick up the Team group by selecting it in the Layers panel, command or control x, then I'll go back to my MSO and go to State 2.
Here we go, Paste Into and finally, we'll pick up the Exercise group. Again, command or control x and back to our Object State. This time we'll go to State 3. And again, Paste Into. Now, I'll hook up my button. I'll open the Buttons and Forms panel and just like I did before, I'll convert this to a button and choose the action Go to Next State.
Let's check it out. I'm gonna preview this in the Animation Preview panel. I click on the button, the objects fade in, and they move. Now we get the grouped animation. Quite a little trick isn't it? But you know, if you need to work with grouped objects that have animations applied, this is the way to go. Create empty frames and make the MSO from those. Then you use Paste Into to insert your animations inside each state. It really makes an impressive interactive experience.
Now, time for a real workout. This one in the gym.
- Setting up an animation workspace
- Working with the Animation panel
- Viewing and editing animation presets
- Working with rotation and scaling
- Creating motion paths
- Adjusting timing
- Animating type
- Animating infographics
- Adding buttons and sounds
- Building more complex animations
- Exporting animation
- Creating, saving, and sharing custom motion presets
Skill Level Intermediate
Q: This course was updated on 03/23/2016. What changed?
A: We updated the video "Supported format overview" and added a new movie, 'Using animations with Publish Online."