Some data types are shared between Lingo and JavaScript syntax, and some data types are specific
to one language or another. The set of data types that Director supports is fixed and cannot be
modified, meaning that new data types cannot be added and existing data types cannot be
removed. Director supports the following data types.
Data type
# (symbol)
Array
Boolean
Color
Constant
Date
Float
Function
Integer
List
Math
null
Number
Object
Point
Rect
RegExp
String
16
Chapter 2: Director Scripting Essentials
Description
A self-contained unit that can be used to represent a condition or flag. For example,
or
.
#list
#word
(JavaScript syntax only) Although not literally a data type, an Array object can be
used to work with linear lists of values. The functionality of an Array object is similar
to that of the List data type in Lingo.
A value that is
(1) or
TRUE
integer constants, 1 for
values are by default the actual Boolean
simple integer constants automatically when required in Director.
In Lingo,
and
TRUE
FALSE
syntax,
and
true
false
Represents an object's color.
A piece of data whose value does not change.
Although not literally a data type, in JavaScript syntax a Date object can be used to
work with dates. In Lingo, use the date() method to create a Date object and work
with dates.
(Lingo only) A floating-point number. For example, 2.345 or 45.43.
(JavaScript syntax only) Although not literally a data type, a Function object can be
used to specify a string of code to run.
(Lingo only) A whole number. For example, 5 or 298.
A linear or property list made up of values or property names and values,
respectively.
(JavaScript syntax only) Although not literally a data type, a Math object can be
used to perform mathematical functions.
(JavaScript syntax only) Denotes a variable whose value behaves as 0 in numeric
contexts and as
in Boolean contexts.
FALSE
(JavaScript syntax only) Although not literally a data type, a Number object can be
used to represent numerical constants, such as a maximum value, not-a-number
(NaN), and infinity.
Although not literally a data type, an Object object can be used to create a custom
named container that contains data and methods that act on that data.
A point on the Stage that has both a horizontal and vertical coordinate.
A rectangle on the Stage.
(JavaScript only) A regular expression pattern that is used to match character
combinations in strings.
A contiguous sequence of keyboard symbols or character values. For example,
"Director" or "$5.00".
(0). In Lingo, all
FALSE
, 0 for
. In JavaScript syntax, all
TRUE
FALSE
or
true
can be either lowercase or uppercase. In JavaScript
must always be lowercase.
or
values are simple
TRUE
FALSE
true
values, but are converted to
false
or
false
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers