Now, let's explore the difference between adding behaviors directly to an object and directly to a group. Let's start by exploring this composition. Press F5 to open the Project pane. If your canvas hasn't already scaled, make sure to press Shift+Z to snap it to the proper view. You'll notice we have a small rectangle and a line. It's hard to see behind all the lines and handles. Let's go up to the View pop-up menu and disable Handles and we'll also disable Lines.
Now we can still see the graphic, it's hard to tell that we have it selected, but if you turn the Visibility on and off, you can make sure you are on the correct layer. Now, I want this small rectangle to slide up and down along the line, and then eventually I would like the line to slide left and right across the screen. So this is a perfect animation for parameter behaviors. With the Small Rectangle layer selected, go to your Inspector, under the Properties tab and twirl open the disclosure triangle for a position. Now, since we want this box to slide up and down vertically, let's animate the Y parameter.
Ctrl-click on the letter Y and choose Randomize. Now, randomize will randomly move this up and down along the line at different rates and different speeds. Go ahead and hit Play to begin playback and you can see how this is affecting that box. It's only taking up a very small area. So go ahead and drag the Amount further out to increase the length of the animation. Now, since we fit the edge of this slider, go ahead and click-and-drag in the slider value to increase this to a much higher length.
Now unfortunately, it's still a little too fast, so let's decrease the Noisiness, and also we'll decrease the Frequency just a little bit. There we go. That's a little bit more along the lines, and what I was looking for. Now, as you can see with the Motion path, the small rectangle sliding off the canvas. So let's stop playback just for a quick second, and reselect the small rectangle. So in the Properties tab, we can just drag it down on its Y-axis by clicking-and-dragging in the value slider.
Notice both the object and the red parameter line is actually sliding. Let me zoom in, so you can see it a little more closely, Command+Plus. I'm going to hold the Spacebar down to bring my Hand tool, and click-and-drag to slide the animation back into view. Let's go ahead and hit the Play button one more time to check out the animation. And you can see the animation updating in the Properties tab of the Inspector. You'll also get this little gear, letting you know that there has been a behavior applied to that specific parameter. Now, we are halfway there.
Let me stop playback for a second, and press Shift+Z to see the entire canvas. Now, if I were to click on the Line and actually apply the behavior directly to this line, let's see what happens. If it's not already up, make sure you are in the Properties section of the Inspector tab, and this time Ctrl-click on X-axis. Since I don't want this movement to be quite as frenetic, I'm just going to use the Oscillate behavior. And you can see my problem, with the behavior applied to just the Line, and this other behavior applied to just the Small Rectangle, when you hit Play, you will notice they are not attached.
So this is when you want to actually apply a behavior to the overarching group. So I'm just going to drag this Oscillate behavior up to the main group. Now, with that Oscillate behavior applied, if you click the Play button, you'll notice the line is now moving properly and the small rectangle is also attached to the line. This is exactly the animation that I was going for. Let me go ahead and stop playback just for a second. To make this a little more interesting, let's go ahead and collapse the Group, and duplicate it, by selecting it and going up under Edit and choosing Duplicate.
In the Properties tab, click on the X- axis value well, and drag to the right to slide this to the right side of the screen. If you click the Play/Pause button one more time, now you'll notice both lines are moving in unison. So to make it a little more random, I'm just going to stop playback for a second, open up our duplicate layer, click on Oscillate, select it in the Behaviors tab of the Inspector, and make a slight adjustment. I would like this to oscillate over a slightly larger area.
Now, as far as the small box, let's go ahead and click on Randomize, and you'll notice there is an option called Random Seed. What this does, anytime you click on it, it generates a slightly different random animation. So the new small rectangle won't be animating at the same speed as the other small rectangle. Go ahead and click the Generate button, and you'll notice it generates a brand new number. Just click anywhere in the lower section of the Layers tab to deselect and click the Play/Pause button and let's look at our animation.
That's starting to look a lot more like what I was looking for. You can feel free to duplicate and create more layers and more lines to your liking, but for now, at least you have a firm grasp of behaviors on layers versus groups.
Get unlimited access to all courses for just $25/month.Become a member
93 Video lessons · 28812 Viewers
135 Video lessons · 63392 Viewers
79 Video lessons · 21496 Viewers
350 Video lessons · 106439 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.