nightwares mini logoA brief introduction to Director

17. Would you Care to See a Menu?

A discussion of the merits — and hazards — of menus.

Director 8.5 Shockwave Studio: A Beginner's Guide

Online reader support forum for the book

Depending on your point of view, menus are a blessing or a curse. If you're a user they're generally pretty helpful; if you're a programmer they are a pain.

This is because menus often contain items which have global effects — that is, effects which stretch across an entire program or even the entire computer system — even when you don't want them to. For example, take the COPY and PASTE options found in most EDIT menus.

There are plenty of times when, as both a programmer and a user, you might see the utility of having such commands available.

But how do you, as a programmer, feel about their usefulness when you contemplate writing a program that switches between graphics and text screens? How would you even begin to go about designing a program wherein COPY and PASTE are available sometimes, but not other times — or, worse still, available all the time, but in different contexts and referring to different things? (How can your program know that COPY text is not the same thing as COPY picture, and vice-versa, for instance? And, if it is, where PASTE works and where it does not?)

(Sometimes, though, menus don't have global enough effects! How and why this can happen will, naturally, be covered later.)

The above is by way of letting you know that menus are tricky little heifers to have on your ranch. If you don't keep them performing well under control and well in your sight, they're likely to hop onto your back and make your life a lot harder than it needs to be.

The KISS Principle (politely, Keep It Simple, Silly) applies here. When contemplating menus, make sure that what you put atop the screen is stuff that's both necessary and relatively simple to control. Otherwise you're headed for headache.

One might ask, then: Why put a menu bar onscreen in the first place? The best answer is this:

In many — virtually all — GUI programs, menu bars of some kind or other are considered standard elements of interface design. Even in many games, which arguably might not need a menu bar (or want one), you will still see a menu bar there. This is such a common and pervasive element of interface design that a user who does not see a menu load with a program is likely to assume that something is wrong. (Trust me on this one.)


1. Introduction

2. Definition of Objectives

3. Specific Objectives

4. Stage Size

5. Stage Location

6. Setting the Stage's Color

7. Beginning to Enter Script

8. A bit More About the StartMovie() Handler

9. Entering Another Handler

10. A Break-down of the CheckColor() Handler

11. A Quick Test

12. Adding Text to the Stage

13. Preparing to Enter a Frame Script

14. Entering the Frame Script

15. Adding a Quit Button

16. The Progress so Far

17. Preparing to Add a Menu

18. Discussion of Menu Requirements

19. Preparing the Menu Storage Member

20. Entering Menu Functions for Macintosh

21. Entering Menu Functions for Windows

22. Efficientlly Handling Multiple Menus

23. Preparing to Insert the Menus Onscreen

24. Adding the Menu Installation Handler

25. Discussion of the Menu Installation Handler

26. Adding Code for an About Box

27. Review of the Scripts

28. Creating a Projector and Running it