Browse DevX
Sign up for e-mail newsletters from DevX


Learning to Animate in Macromedia Flash MX  : Page 5

Lesson two of this Flash Tutorial Series shows you how to create smooth and detailed Flash movies superior to almost any animated GIF file. Learn to create lightweight and dynamic animations using Flash MX.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Create a Motion Tween Animation
Now that you've completed the Shape Tweening, you can animate the sphere on the "Motion Animation" layer in an orbital path. Flash can easily move a symbol from point to point along a straight line, but to get the Sphere symbol to move in a circular motion requires a Motion Guide. Motion Guides are simply paths of any shape that serve to guide a symbol along a specific route. In this case, the Motion Guide for the Sphere symbol will be a simple circle. Select keyframe 1 in the "Motion Animation" layer and then click on the Add Motion Guide button to add a Motion Guide layer to the "Motion Animation" layer. Figure 14 shows the Add Motion button location and shows how the Timeline should appear after you click the button.

Figure 14: You can find the Add Motion button under the Timeline. Here's how the Timeline should appear after you click the button.
Select keyframe 1 in the Motion Guide layer and draw a perfect circle with a stroke of black and no fill using the Oval tool. This Motion Guide circle will be visible only while you're working in the Flash document; it will not be viewable in the published movie. See Figure 15 for the approximate size and placement of the motion path.
Figure 15: The Motion Guide for the orbiting sphere symbol appears only in the Flash IDE, not in the finished movie.
Select keyframe 1 on the "Motion Animation" layer. Click and drag the ball to the top of the circle. Note that because the Motion Guide layer is linked to the layer you are working in, the sphere symbol easily snaps to the motion guide path. After placing the sphere at the top of the circular motion guide in frame 1, refer to Figure 16 to see the approximate placement for the sphere in keyframes 12, 24 and 36.

Figure 16: Set the positions for the orbiting sphere on the motion guide at keyframes 1, 12, 24 and 36 as shown.
154 Finally, select keyframe 1 in the "Motion Animation" layer. Apply a Motion Tween by going down to the Properties panel, and selecting the "Motion" option from the Tween pull-down menu. Repeat the process for keyframes 12 and 24. Your timeline panel should look identical to Figure 17, with the "Motion Animation" layer colored in light blue and arrows that indicate a Motion Tween occurs between keyframes. Press the "Enter" key to preview the animation. Save your Flash file, if you haven't already.

Figure 17: Here's the final Timeline, with all the animation scripting in place.
PublishYour Work
If you wish to preview your movie as it will appear in a stand-alone Flash file, go to the Control menu and select the Test Movie option. When you are finished previewing the movie, you can simply close the window. To create a final Flash file and embed it in an HTML page click on the Arrow tool, move down to the Properties panel and click on the button labeled Flash Player 6

In the dialog box that appears, simply click the "Publish" button. Clicking the Publish button creates an HTML file with your animated movie embedded in it, located in the directory where you saved your .fla file. To see the completed image, load that HTML file into your browser. Congratulations! You've just completed your first venture into Flash animation. Animation is an extremely visual medium, and this tutorial covers only the basics. If you want to experiment on your own, try adding more Shape hints to the letter "A" and the square. This will give you a better idea of how much control you can exert over Shape Tweens in Flash. You might also try drawing more complex or abstract paths in the Motion Guide layer to see the limitless number of ways you can guide an object along a path.

John Lee holds a B.F.A. in Graphic Design and is the sole proprietor of John Lee Studios in Louisville, KY where he is a freelance writer, illustrator and Web designer. Samples of his work can be seen at www.johnleestudio.net. Reach him by e-mail at johnleeart@alltel.net.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date