Using the Watcher

The Watcher window allows you to track variables and simple expressions and view their contents while a movie runs. In this task, you will use the Watcher window to view the contents of the property list you just created.

1.

If you have run the movie, reopen it (File > Open). This clears any variables set while the movie was running and will make it easier for you to follow the next steps.

Copy the textgLocationListfrom your script and then paste it into the box at the top of the Watcher window.

To ensure that the variable name is exactly the same in the Watcher window as it is in your script, you should copy it from the script and paste it into the window. If the spelling of the variable name differs in these two places, the Watcher won't be able to track the variable.

Figure .

4.

Click the Add button to add the variable to the Watcher list.

The variable currently has no value, so <Void> is returned.

Figure .

5.

Close the Script window.

6.

Play the movie. Don't click any of the buttons on the stage—just click Play to play the movie.

Playing the movie ensures that the new script is read into memory. Now you can see that your script works. In the Watcher window, you can see that the global variable contains all the names and code information from the Location codes field. With this information in memory, Director now has access to this information and can use it throughout the movie.

Figure .

Using the Watcher is a good way to make sure that a variable or simple expression holds the value you expect.