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

Chapter 25. Storyboarding to Finished Project > Animating the Tank Rotation

Animating the Tank Rotation

At this point, it became obvious that the turrets would have to turn independently of the tank body movie clips so that the tanks could move to the new location without causing the turrets to point the wrong way. Inside the tank symbols, I embedded the turret into a new movie clip and gave it an instance name of turret so that it could be rotated whenever the rotation control was changed.

When the user clicks on the player1target movie clip, the tank needs to rotate toward where the mouse is clicked and then move to that point. First I initialized a few variables by placing the following code on the player1tank movie clip instance:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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