Note About This Book: Advanced Lingo For Games was written by Gary Rosenzweig in 2000 for users of Macromedia Director 7. It is presented here for free on an as-is basis, with no updating. Most of the information and code here can be used in the most recent version of Director. The book has been reproduced from the final editing files archived in 2000, and not the final proof galleys. So some minor differences between this version and the printed version my exist. The entire contents of this book are Copyright 2000, Gary Rosenzweig. No part may be reproduced or copied without written permission. The text here is provided for individual use only.
Want to thank me for making this book available for free? Just buy Special Edition Using Macromedia Director MX and we'll call it even!

Advanced Lingo For Games
by Gary Rosenzweig


Chapter 13 Section 4

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.