MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 85

Director scripting reference
Table of Contents

Advertisement

Locating the problem
Do the following to start locating a problem:
Think backwards through the chain to identify where the unexpected started to happen.
Use the Message window to trace which frames the movie goes through and the handlers
that your scripts run.
Determine what the scripts should be doing and consider what in these statements relates to
the problem. For example, if a text cast member is not editable when you expect it to be, where
in the movie does (or does not) your script set the cast member's
If a sprite does not change as intended on the Stage, is the
somewhere?
Does the problem occur only on certain computers and not others? Does it happen only when
the display is set to millions of colors? Maybe something in the computer is interfering with
the application.
You can focus on specific lines of script by inserting a breakpoint—a point where the script pauses
its execution and invokes the Debugger window—in a line. This gives you a chance to analyze
conditions at that point before the script proceeds. For information on how to insert breakpoints
in a script, see
"Debugging in the Debugger window" on page
Solving simple problems
When finding a bug, it's a good idea to check for simple problems first.
The first debugging test occurs when you compile your script. You can compile your script by
doing one of the following:
In the Script window, click Recompile All Modified Scripts.
From the Control menu, click Recompile All Scripts.
Press Shift+F8.
Close the Script window.
It is typically more convenient to compile scripts by using one of the first three options. The
fourth option requires that you close the Script window each time you want to compile a script.
When you compile your script, Macromedia Director MX 2004 gives you an error message if the
script contains incorrect syntax. The message usually includes the line in which the problem was
first detected. A question mark appears at the spot in the line where Director first found
the problem.
For example, the first line in the previous error message tells you that the script error in question
is a syntax error, and also tells you what the syntax error is. The second line in the error message
displays the actual line of code that contains the syntax error.
property?
editable
method needed
updateStage()
94.
Basic debugging
85

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents