
384
Chapter 12: Methods
When creating a list using the syntax
[]
, with or without parameters, the index of list values
begins with 0.
The maximum length of a single line of executable script is 256 characters. Large lists cannot be
created using
list()
. To create a list with a large amount of data, enclose the data in square
brackets ([]), put the data into a field, and then assign the field to a variable. The variable’s
content is a list of the data.
Parameters
strigValue1, stringValue2 ...
Optional. A list of strings that specify the initial values in
the list.
Example
This statement sets the variable named designers equal to a linear list that contains the names
Gee, Kayne, and Ohashi:
-- Lingo syntax
designers = list("Gee", "Kayne", "Ohashi") -- using list()
designers = ["Gee", "Kayne", "Ohashi"] -- using brackets
// JavaScript syntax
var designers = list("Gee", "Kayne", "Ohashi");
See also
propList()
listP()
Usage
listP(
item
)
Description
Function; indicates whether a specified item is a list, rectangle, or point (1
or TRUE
) or not
(0
or FALSE
).
Parameters
item
Required. Specifies the item to test.
Example
This statement checks whether the list in the variable
designers
is a list, rectangle, or point, and
displays the result in the Message window:
put listP(designers)
The result is 1, which is the numerical equivalent of
TRUE
.
See also
ilk()
,
objectP()
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...