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

Card Snap

In this broken file (“02_card_snap.fla”), I’ve added quite a bit to the preceding Card Flip file (although we’re not playing three-card monte yet). We’re successfully assigning a unique random number to each “card” instance’s cardNum variable. I even threw in a Dynamic Text field just for testing purposes. (We don’t want the user to know the value of cardNum for each card.) The randomization works, as does the animation, but we want the card to reveal its face in the middle of the animation. The instant the _yscale reaches its minimum (index 2 of the tweenLocs array), we want to make the instance called card jump to a frame within its 11-frame movie. We think most of it is built right, but we never see the card’s value!

Hint

Code appears in both the first frame of the movie and in the first frame of the symbol named Clip w-Card. Because the randomization is working fine, you don’t need to bother with the code in the main timeline.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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