nightwares mini logoA brief introduction to Director

8. Roll 'em!

A little explanation about the script you entered.

Director 8.5 Shockwave Studio: A Beginner's Guide

Online reader support forum for the book

The StartMovie() handler is the first handler executed when your program begins to run (hence its name).

There is another handler, called StopMovie(), which runs whenever the program stops running (that is, generally, when the user quits the program).

For this first program we will not be defining a StopMovie() handler, but they do exist, and we will need them later, so remember that they're there.

Note that handler names, when called from within another handler or when being described, have parentheses following them.

Note also that handler names are capitalized initially, and that when they are actually defined within the script as opposed to being called from another handler, there are no parentheses following.

If you put parentheses at the top of a handler definition, you will get an error. So why use parentheses when calling a handler from another handler or when referring to it? To let the reader — you or another programmer — know right away what what s/he is reading is either a handler call or a handler definition , based simply on conventional syntax. This saves you having to write tons of comment lines later on.

Overall neither of these conventions is crucial to making a workable Director program, but these conventions are pretty standard in the world of programming and will be used everywhere on this site.

We'll explore parentheses and their uses later. For now, use this form as your standard way of writing a script. Good habits, remember...?


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