User Guide
92 Chapter 4: Debugging Scripts in Director
Understanding object structure
The Object inspector can be very useful for understanding the structure of complex objects. For
example, 3D cast members have many layers of properties. Because the Object inspector shows
you a visual representation of the nested structure of those properties, it makes it much easier to
become familiar with them and their relationships to each other. Understanding the property
structure of objects in Director is important when writing scripts.
The ability to watch the values of properties change while a movie plays is helpful for
understanding what is happening in the movie. It is especially helpful when testing and
debugging scripts because you can watch as the values change based on scripts you’ve written.
The Director Debugger window displays this information also, but is only available when you
are in debugging mode. For more information on debugging, see “Advanced debugging”
on page 99.
Viewable objects
The following are some of the objects you can enter into the Object inspector:
• Sprites, such as sprite(3)
• Cast members, such as member("3d")
• Global variables, such as gMyList
• Child objects, such as gMyChild
• Macromedia Flash objects, such as gMyFlashObject; for more information about using Flash
objects in Director, see the Using Director topics in the Director Help Panel.
• Script expressions, such as sprite(7).blend
Viewing objects
There are three ways to view an object in the Object inspector. You can drag items directly into
the Object inspector, enter the name of an item into the Object inspector manually, or use the
Inspect Object button in the Message and Script windows.
To drag an item to the Object inspector, do one of the following:
• Select a sprite in the Score window and drag it to the Object inspector.
• Select a cast member in the Cast window and drag it to the Object inspector.
• Select a the name of an object in the Script, Message, or Text window and drag it to the
Object inspector.
To enter an object manually in the Object inspector:
1 Double-click in the first empty cell in the Object column of the Object inspector.
2 Type the name of the object into the cell. Use the same name you would use to refer to the
object in your scripts.
3 Press Enter (Windows) or Return (Macintosh). If the object has subproperties, a plus sign (+)
appears to the left of it.
4 Click the plus sign. The properties of the object appear below it. Properties with subproperties
appear with a plus sign to their left. Click each plus sign to display the subproperties.