Tutorial Category: Flash
Mercury Cougar Cars look so shiny and new after a nice wash and polish. How about we keep it that way! With this tutorial, you’ll learn how to add an animated shine using a gradient and mask technique.
Find a nice image you want to work with. I am using a picture of a 2001 Mercury Cougar C2:
Open a new document in Flash. I set my canvas size at 300 pixels wide and 200 pixels high. Go to File > Import > Import To Stage and choose your image. I named the layer CAR.
Create a new layer and call it GRADIENT. Using the Rectangle Tool draw a rectangle to the left of your image making sure it is taller than your image. Make sure it has no border. The fill should be a linear white gradient with a left fill of 0% alpha, a middle fill of 100% alpha and right fill of 0% alpha. That basically means it’s going from transparent to white to transparent. You should have the following so far:
Now let’s create the areas where we want the shine to animate. Create a new layer and call it SHINE AREAS. Using the Pen Tool I defined some areas. Make sure there is no border. The fill can be any color but I used red because it’s easier to see on my image. Here are my results:
On your timeline, insert keyframes at frame 30 for each of the 3 layers as seen below:
We want the gradient to move from left to right. It’s position on the first keyframe is to the left. For the keyframe at 30 we want it’s position to be all the way to the right. So click on the keyframe at 30 for the GRADIENT layer. Holding down the Shift key, move the gradient all the way over to the right.
Now click on any frame between 1 and 30 on the GRADIENT layer. On the Properties panel at the bottom of your screen, there is an option for Tween. Set it to Shape. This will animate your gradient shape, making it move from left to right. You should see the following in your timeline to signify the tween is in place:
If you were to hit the enter key at this point, you should see that the white gradient will move from left to right. Cool huh, but not exactly what we were looking for yet. Here’s the final step to finish it off. Right click on your SHINE AREAS layer and choose Mask:
So now, instead of the white gradient displaying fully across the image, it will only display within the shine areas that were created! Here is my final result. Enjoy!