Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In this chapter we'll look at animating masks in Flash. There are two types of mask animations. You can animate the mask itself or animate the content that is masked. In this movie, we will look at animating the mask itself. If you are following along, go ahead and open Animating_Masks.fla from the Chapter 4 folder. If you don't have the Exercise Files, you can just use a simple vector shape and a mask like the mask we'll look at in this movie. So I'll double-click the monster to enter its Timeline. Then I will double-click the monster's body to enter its Timeline. Inside of the monster's body, there are several different movie clips. There is one for each eye and actually the three eyes on the right have completed animations already; if I test the movie we can see that, Command +Return on the Mac, Ctrl+Enter on the PC.
So the three eyes on the right are blinking using an animated mask. So for this exercise, we will animate the eye all the way on the right. So I am going to double-click the eye on the right, and you can see that I have already set up the file for you. We have a Mask, a Masked layer and the Eye. Let's take a look at each layer. I will unlock them all and you can see on the Mask layer, there is a purple mask that's kind of curved up and this mask is going to fit the contours of the monster's eye, that's why I curved it in a little bit. I will lock and hide that layer.
The Masked layer is a green circle. Now you can see it better if I zoom in a little bit. So I am going to click and drag to zoom in using the Zoom tool and you can see that the green masked area that represents the monster's eyelid. I will lock and hide that layer. The Eye is just the monster's eye. So I will show the Mask and the Masked layer and I will unlock both of them. Note that I also extend its Timeline to frame 100 to accommodate an animation. Here I am going to create a simple shape tween for the mask. When the mask is going to reveal the monster's eyelid, which will make it appear as if the monster is blinking. So I will create a keyframe in the frame 10 in the Mask layer by selecting frame 10 and pressing F6. Then I will select frame 20 and press F6 to create a keyframe there as well.
Now I will create the shape tweens by right-clicking or Ctrl-clicking in between frames 1 and 10 and choosing Create Shape Tween. I will do the same thing between frames 10 and 20, right- click or Ctrl-click and choose Create Shape Tween. Now I'll go to frame 10 and create the middle frame. All I am going to do there is move the mask downward on the monster's eye, and then I am going to modify the shape to bend out a little bit, again to fit the contours of the monster's eye. If you scrub the playhead, you should see the shape tween in action. You can lock all layers to preview the mask in Flash.
Let's test the movie to see this in the Flash Player. There is the monster blinking. You may notice the animation doesn't look exactly the same as the other animations and that's because I applied easing to the other animations. Now we will apply easing here real quick. Click in between frames 1 and 10 and then in the Tweening area of the Property inspector set the Easing to Ease out. That way the animation will move faster at the beginning and slow at the end when the monster's eyes are closed. I will do the opposite in between frames 10 and 20. I will set the easing to Ease in by dragging the Ease slider all the way to -100. Now I will test the movie to preview the animation.
There is our animated mask working to make the monster blink. So remember that whenever you use masks, you don't need to be limited to using a static mask, you can animate masks and add neat effects to your Flash movies.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 33088 Viewers
94 Video lessons · 22959 Viewers
78 Video lessons · 9298 Viewers
147 Video lessons · 3102 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.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.