76
Chapter 3: Writing Scripts in Director
•
The Categorized 3D Lingo menu lists categories of all 3D Lingo elements according to the
features they are used for.
•
The Scripting Xtras pop-up menu includes the methods and properties of all scripting Xtra
extensions found, regardless of whether they are Macromedia or third-party Xtra extensions.
Note:
The scripting Xtra extensions listed in the Scripting Xtras pop-up menu are only those that
support the
interface()
method and whose names actually appear in the pop-up menu. Although
some cast member media types such as 3D and DVD also support the
interface()
method, they do
not appear in the Scripting Xtras pop-up menu because they are not implemented in Director as
scripting Xtra extensions.
When you select an element from the pop-up menus, Director inserts the element at the insertion
point in the Script window.
When an element requires additional parameters, placeholder names are included that indicate
the additional required information. When more than one argument or parameter is required, the
first one is highlighted for you, so all you must do is type to replace it. You must select and change
the other parameters yourself.
Some cast member types and scripting Xtra extensions provide scripting terms that do not appear
in the pop-up menus. These member types and Xtra extensions often have their own
documentation, and you can find some information from within Director.
To display a list of available Xtra extensions:
•
Issue either
put(_player.xtraList)
or
trace(_player.xtraList)
in the Message window.
To display a list of available scripting Xtra extensions:
•
Issue either
put(_player.scriptingXtraList)
or
trace(_player.scriptingXtraList)
in the Message window.
To display a list of methods and properties for an Xtra extension:
•
From the Scripting Xtras pop-up menu, point to an Xtra extension, and on the submenu,
click put interface. The methods and properties for that Xtra extension appear in the Message
window.
Entering and editing text
Entering and editing text in a Script window is similar to entering and editing text in any
other field.
The following are common editing tasks that you perform in the Script window:
•
To select a word, double-click the word.
•
To select an entire script, select Select All from the Edit menu.
•
To start a new line, enter a carriage return.
•
In Lingo, to wrap a long line of code with a continuation symbol, press Alt+Enter (Windows)
or Return (Macintosh) where you want to insert a soft line break. The continuation
symbol (\) that appears indicates that the statement continues on the next line.
In JavaScript syntax, to wrap a long line of code, insert a regular line break by pressing Enter
(Windows) or Return (Macintosh). The Lingo continuation symbol causes a script error in
JavaScript syntax scripts.
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...