|
Want to thank me for making this book available for free? Just buy Special Edition Using Macromedia Director MX
Advanced Lingo For Games
| |
| Putting It All Together
Before even touching the Score, you need to set several members. You need a text member that contains all the questions and answers in the format mentioned previously. In the example movie, this is called "Sample Data." Then, you need a "question" member and four "answer" members. The latter should be named "answer 1," "answer 2," and so on. You also need a text member called "possible points" and one called "score." Finally, you need four buttons, each with a bitmap for the up state and a bitmap for the down state. After you have all these members, you can place them in the Score and arrange them on the Stage. Figure 13.4 shows the Score with these present. Sprite channel numbers are not important in this game because they are never referred to in the code.
Figure 13.4
The Score shows all of the sprites needed for the Trivia game.
All that remains is for you to drop the frame behavior on the frame and fill in the appropriate parameters. Then, drop the button behavior on the four buttons and set their answer numbers and key mappings. If you leave the key mapping parameter blank, it will not use that feature at all. In the example movie, the game also has a start frame and an end frame. | |