• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Scripted Animation Basics > Animating Shapes Using the Built-in Twee...

Animating Shapes Using the Built-in Tween Classes

Although you can animate objects and shapes quite easily using onEnterFrame or setInterval(), you can leverage Flash's built-in tweening equations to easily create professional and fun animations and effects. For example, by adding one line of code, you can make the text field created in the previous exercise animate across the Stage. Add the following line of code to the bottom of the Actions panel:

new mx.transitions.Tween(my_txt, "_x", mx.transitions.easing.Regular.easeInOut, 0, 550, 3, true);


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint