EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 384

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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()