add
Usage
-- Lingo syntax
linearList.add(value)
// JavaScript syntax
array.push(value)
Description
List command; for linear lists only, adds a value to a linear list. For a sorted list, the value is placed
in its proper order. For an unsorted list, the value is added to the end of the list.
This command returns an error when used on a property list.
Note: Don't confuse the
concatenate strings.
Parameters
Required. A value to add to the linear list.
value
Example
These statements add the value 2 to the list named
-- Lingo syntax
bids = [3, 4, 1]
bids.add(2)
// JavaScript syntax
bids = new Array(3,4,1);
bids.push(2);
This statement adds 2 to the sorted linear list [1, 4, 5]. The new item remains in alphanumeric
order because the list is sorted.
-- Lingo syntax
bids.add(2)
// JavaScript syntax
bids.push(2);
// to sort the list using JavaScript syntax
bids.sort();
See also
sort
add (3D texture)
Usage
--Lingo syntax
member(whichCastmember).model(whichModel).meshdeform.mesh[index].\
textureLayer.add()
// JavaScript syntax
member(whichCastmember).model(whichModel).meshdeform.mesh[index].\
textureLayer.add()
230
Chapter 12: Methods
command with the
add
operator used for addition or the & operator used to
+
. The resulting list is [3, 4, 1, 2].
bids
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