Chapter 27. Animating with ActionScript
This chapter teaches you how to use features of Flash animation capabilities with ActionScript 3.0. If you've ever wondered how dynamic random motion can be created in Flash content, look no farther. You can start learning about ActionScript-based motion by using good old-fashioned motion tweens that you learned how to create in earlier chapters of this book.
You can use the ActionScript 3.0 Tween class to help you move objects around on the Stage. The Tween class enables you to animate properties of any object, including MovieClip objects. In this section, you learn how to add motion to elements with the Tween class.
Note
We explore only some aspects of the Tween class in this chapter. For more information, refer to the Flash CS4 Help pages and search with the phrase "Tween class," where you can find several examples of other methods and properties of the Tween class.
Note
We've updated this section to include coverage of 3D properties of DisplayObject instances, such as rotationX, rotationY, and z, now available in Flash Player 10.
Reviewing the Tween Parameters
To use the Tween class in ActionScript 3.0 code, you need to import the fl.transitions.Tween class at the top of your script, such as:
import fl.transitions.Tween;
This class is not an intrinsic class for the Flash Player, which means that the Tween class is created at ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access