User Guide
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