Chapter 16
432
For example, the following line indicates several things:
== Frame: 39 Script: 1 Handler: mouseUp
•
The movie entered frame 39.
•
The movie ran script 1, the first script attached to the frame.
•
The movie ran the
on
mouseUp
handler in script 1 after the movie entered the frame.
Entries after an arrow made up of a double hyphen and right angle bracket (
-->
) indicate lines of
Lingo that have run. For example, the lines:
--> sound fadeOut 1,5*60
--> if leftSide < 10 then
--> if leftSide < 200 then
--> go to frame "Game Start"
indicate that these Lingo statements have run. Suppose you were trying to determine why the
playhead didn’t go to the frame labeled “Game Start.” If the line
--> go to frame "Game
Start"
never appeared in the Message window, maybe the condition in the previous statement
wasn’t what you expected.
The Message window Output pane can fill with large amounts of text when the Trace button is
on. To delete the contents of the Output pane, click the Clear button. If the Output pane is not
visible, the contents of the Input pane are deleted.
You can keep track of the value of variables and other objects by selecting the name of the object
in the Message window and clicking the Inspect Object button. The object is added to the Object
inspector, where its value is displayed and updated as the movie plays. For more information
about the Object inspector, see “Using the Object inspector” on page 433.
When you are in debugging mode, you can follow how a variable changes by selecting it in the
Message window and then clicking the Watch Expression button. Director then adds the variable
to the Watcher pane in the Debugger window, where its value is displayed and updated as the
movie plays. For more information about the Watcher pane, see “Using the Debugger window”
on page 435.
Advanced debugging
If the problem isn’t easy to identify, try the following approaches:
•
Determine which section has the problem. For example, if clicking a button produces the
wrong result, investigate the script assigned to the button.
If a sprite does the wrong thing, try checking the sprite’s properties related to the sprite.
Are they set to the values you want when you want?
•
Figure out where the Lingo flows. When a section of the movie doesn’t do what you want, first
try to trace the movie’s sequence of events in your head. Look at other scripts in the message
hierarchy to make sure Director is running the correct handler.
•
Follow the tracing in the Message window; this shows which frames the movie goes through
and any handlers that the movie calls as the movie plays.
•
Try using the Step Script and Step Into features in the Debugger window and see whether the
results differ from what you expect.
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...