
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
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...