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

Card Flip

The file (“01_card_flip.fla”) is just the start of a card-game movie that could evolve to be three-card monte. Although this file will take many steps to finish, the current version is supposed to allow the user to click on any card. The card then animates by reducing its _yscale until it reaches 0. Then it’s supposed to increase its _yscale until it reaches the normal 100 again, where it stops. Don’t worry about showing the face of the card—we have bigger problems! The current version appears to scale down alright, but then it seems to scale up forever! All the code is in a keyframe inside the Card Movie Clip (so that it’s automatically duplicated for each instance). See whether you can find and fix the bug.

Hint

The error is probably different than it appears. If you edit the master version of the Card symbol and place an odd graphic shape inside the rectangle shape (see Figure W18.1), you’ll see that the next time you test the movie, the error is not that the _yscale increases too much, but rather that it starts to decrease and keeps decreasing below 0 (where it will appear upside down). Don’t worry about _yscale going above 100; make sure that it never goes below 0, and you’ll be on the right track.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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