|During the holiday season, we can use a sparkling star animation for many FlashR projects. This tutorial continues to discuss how the Christmas ecard (Pamela Gladding Ecards) was created. If you haven't read the first part of this tutorial, use the Back link at the bottom of the page.|
To create the sparkling star animation, we double-click on our starAni movie clip. This will take us into the Edit mode. Our first problem is that the background color of the stage is white and the star will be white. In order to be able to see the white star as we work, let's temporarily change the background-color of the stage to black. From the Menubar, click Modify – Document and change the Background color for the movie. We now have a nice black area to work on.
We already have one star on the stage. Our star animation will have two parts, one larger star on the bottom and a smaller star on top. We will add a Glow filter to the star on the stage. Rename Layer 1 to "star1" and convert the star on the stage to a symbol named "star1". Apply the Glow filter with the X and Y Blur set to 10px, Strength set to 100% and Color to white.
From the Menubar, click Edit – Copy to make a copy of the star1 movie clip. Create a new layer named "star2" and paste the copy onto this layer. If necessary, align the second movie clip over the first so that the centers of both stars align. We want this movie clip to be a little smaller than the one below. Use the Free Transform tool to reduce the size of the star.
Still working on the second (top) movie clip, we will create a Classic Motion Tween animation that will rotate this small star clockwise over 20 frames. Add a Keyframe to Frame 5 and use the Free Transform tool to rotate the movie clip 1/4 circle. Add a Keyframe to Frame 10 and rotate the movie clip another 1/4 circle. Do the same for Frame 15 and 20. Right-click between Frames 1 and 5 and choose Create Classic Tween from the menu. Repeat this for the other frame spreads. That takes care of the aniamtion for the top star.
Now we will animate the Alpha opacity of the first (bottom) star. On Frame 1 of the star1 layer, right-click and choose Create Motion Tween. This will give you 24 frames by default. Drag the tween span to end on Frame 20, so that both animations will end at the same time. On Frame 1, set the Style - Alpha for this movie clip to 0. On Frame 10, add a Keyframe (Insert Keyframe – All) and set the Alpha back to 100%. Add a Keyframe on Frame 20 and set the Alpha to 0. This will cause the larger (bottom) star to fade in and out as the smaller (top) star rotates.
Because we want this sparkle animation to repeat, we will not put a stop(); code on Frame 20. We can set the Document Background Color back to white and exit Edit mode to go back to Scene 1. Test your movie.
View Ecard at Pamela Gladding Ecards
Join us in the Flash forum.