596
Chapter 13: Operators
•
Symbols use the 128 ASCII characters, and letters with diacritical or accent marks are treated
as their base letter.
•
Periods may not be used in symbols.
All symbols, global variables, and names of parameters passed to global variables are stored in a
common lookup table.
Example
This statement sets the state variable to the symbol
#Playing
:
-- Lingo syntax
state = #Playing
// JavaScript syntax
var state = symbol("Playing");
See also
ilk()
,
string()
,
symbol()
,
symbolP()
. (dot operator)
Usage
-- Lingo syntax
objectReference.objectProperty
textExpression.objectProperty
object
.
commandOrFunction
()
// JavaScript syntax
objectReference.objectProperty;
textExpression.objectProperty;
object
.
commandOrFunction
();
Description
Operator; used to test or set properties of objects, or to issue a command or execute a function of
the object. The object may be a cast member, a sprite, a property list, a child object of a parent
script, or a behavior.
Example
This statement displays the current member contained by the sprite in channel 10:
-- Lingo syntax
put(sprite(10).member)
// JavaScript syntax
put(sprite(10).member);
To use the alternate syntax and call a function, you can use this form:
-- Lingo syntax
myColorObject = color(124, 22, 233)
put(myColorObject.ilk())
-- #color
// JavaScript syntax
var myColorObject = color(124, 22, 233);
put(myColorObject.ilk());
// #color
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...