Chapter 16
430
Testing Lingo
You can test Lingo commands to see how they work by entering them in the Message window and
observing the results. When you enter a command in the Message window, Director executes the
command immediately, regardless of whether a movie is playing.
To test a one-line Lingo statement:
1
Type the statement directly in the Message window.
2
Press Enter (Windows) or Return (Macintosh). Director executes the statement.
If the statement is valid, the Message window displays the result of the statement in the Output
pane at the bottom of the window. If the script is invalid, an alert appears.
For example, if you type the following statement into the Message window:
put 50+50
and press Enter (Windows) or Return (Macintosh), the result will appear in the Output pane:
-- 100
If you type the following statement into the Message window:
the stagecolor = 255
and press Enter (Windows) or Return (Macintosh), the Stage will become black.
You can test multiple lines of Lingo all at once by copying and pasting Lingo statements into the
Message window or by pressing Shift-Return after each line of Lingo.
To execute multiple lines of Lingo by copying and pasting:
1
Copy the lines of Lingo to the clipboard.
2
Enter a blank line in the Message window.
3
Paste the Lingo into the input pane of the Message window.
4
Place the insertion point at the end of the last line of Lingo.
5
Press Enter (Windows) or Return (Macintosh). Director finds the first blank
line above the insertion point and executes each line of Lingo after the blank line in succession.
To enter multiple lines of Lingo manually:
1
Enter a blank line in the Message window.
2
Enter the first line of Lingo.
3
Press Shift+Return at the end of the line.
4
Repeat steps 2 and 3 until you have entered the last line of Lingo.
5
Press Enter (Windows) or Return (Macintosh). Director finds the first blank
line above the insertion point and executes each line of Lingo after the blank line in succession.
You can test a handler without running the movie by writing the handler in a Movie Script or
Behavior Script window, and then calling it from the Message window.
Содержание DIRECTOR MX-USING DIRECTOR MX
Страница 1: ...Using Director MX Macromedia Director MX...
Страница 12: ...Contents 12...
Страница 156: ...Chapter 4 156...
Страница 202: ...Chapter 6 202...
Страница 244: ...Chapter 7 244...
Страница 292: ...Chapter 10 292...
Страница 330: ...Chapter 12 330...
Страница 356: ...Chapter 13 356...
Страница 372: ...Chapter 14 372...
Страница 442: ...Chapter 16 442...
Страница 472: ...Chapter 18 472...
Страница 520: ...Chapter 19 520...
Страница 536: ...Chapter 20 536...
Страница 562: ...Chapter 23 562...
Страница 566: ...Chapter 24 566...
Страница 602: ...Chapter 27 602...