Now, if you are joining me from the last video, you might be looking at this wondering, why am I looking at the same project, and if you are not joining me from the last video, let me explain what happened. In the process of explaining how to add and adjust behaviors, we went through a couple of different behaviors. But to be honest, the easiest way to create this specific animation, let's use parameter behaviors, and now of course you're probably going, well what animation. What we are going to do is have the line slide left and right, back and forth across the screen, and the fastest way to do that is to actually apply a behavior, specifically to the position parameter of these objects.
So go ahead and select the largest line in the center of your canvas, and navigate to your Inspector tab, and make sure you are in the Properties section. Now, like I said I want to animate the position. So open up the Position disclosure triangle and you'll notice we can adjust the X, the Y or the Z. Now, since I want this to slide left or right, I want it to move on the X-axis. So Ctrl-click directly on the letter X and you'll see a menu pop-up listing all the different behaviors you can apply to this specific parameter, hence the name parameter behaviors, and since we want this to just slide back and forth, the best parameter behavior will be Oscillate.
So go ahead and choose that and you'll notice immediately we have our Motion path, this red line in the center of the canvas. This is showing me exactly where and how this line is going to animate. Go ahead and press the Play/Pause button in the bottom of your canvas, and let's look at this line, slide back and forth. Now, since this is a behavior, it's very easy to make adjustments. All you do is drag the different sliders. Notice how the Inspector automatically switches to the Behaviors tab, once we apply this behavior. Go ahead and click-and-drag on the Speed parameter to make this line move slightly faster.
And since we want this to slide a longer distance, let's go ahead and click-and-drag right in the Amplitude value slider. If you just click-and-hold your mouse and drag out, you'll increase the length of that behavior. Now, we have a line sliding back and forth fairly quickly across the canvas. Now, I'm going to stop playback just for one second, and we are going to use the similar technique we'd used in the last movie, where we copy the behavior from one layer to another. Press F5 to open the Project pane, make sure you are on the Layers tab, and you'll notice the Oscillate behavior is applied to this middle rectangle.
Now if you hold down Option, as you click-and-drag this behavior on to the next rectangle, you will notice it has now copied that behavior. Now go ahead and press the Play button one more time and you'll notice they are both moving in unison. So if you just slightly change any of these different parameters, we'll have a slightly different animation. So I'm going to slow this down, and make its Amplitude just a little bit larger, and now I'll click the Play/Pause button to watch it animate one more time. That's looking pretty good. Let me go ahead and pause this one last time, making sure that I can see this last rectangle, and let's select the Rectangle directly in the Layers tab.
And this time, instead of applying the behavior directly to the X position property of this rectangle, let's use the Add Behavior in the top of the canvas in your toolbar. You'll notice there is a section for Parameter, and I can choose Oscillate. Now we are almost there, but if you notice, there is no animation path on this object yet, and that's because it doesn't know exactly what parameter to apply this behavior to. So in the Apply To section, go ahead and click on the Go button, and you will notice all the different parameters of that object.
So we want to go to the Properties and Transform the position only on X-axis. And now we've just tied that behavior to the X-axis of the last object. Go ahead and begin playback on your canvas again, and now you'll notice we have three separate lines, all moving slightly differently, very quickly and easily using the parameter behaviors.
Get unlimited access to all courses for just $25/month.Become a member
110 Video lessons · 51285 Viewers
86 Video lessons · 14545 Viewers
79 Video lessons · 15324 Viewers
350 Video lessons · 101505 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.
Your file was successfully uploaded.