User Guide

Chapter 360
Description
Movie property; a list of child objects that have been explicitly added to this list. Objects in
actorList receive a stepFrame message each time the playhead enters a frame.
To add an object to the actorList, use add actorList, theObject. The object’s on stepFrame
handler in its parent or ancestor script will then be called automatically at each frame advance.
To clear objects from
the actorList, set actorList to [ ], which is an empty list.
Director doesnt clear the contents of
actorList when branching to another movie, which can
cause unpredictable behavior in the new movie. To prevent child objects in the current movie
from being carried over to the new movie, insert the statement
set the actorList = [ ] in the
on prepareMovie handler of the new movie.
Unlike previous versions of Director,
actorList is now supported in the Director player for Java.
Examples
This statement adds a child object created from the parent script Moving Ball. All three values are
parameters that the script requires.
add the actorList, new(script "MovingBall", 1, 200,200)
This statement displays the contents of actorList in the Message window:
put the actorList
This statement clears objects from actorList.
the actorList = [ ]
See also
new()
add
Syntax
linearList.add(value)
add linearList, value
Description
List command; for linear lists only, adds the value specified by value to the linear list specified by
linearList. 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 add command with the + operator used for addition or the & operator used to
concatenate strings.
Examples
These statements add the value 2 to the list named bids. The resulting list is [3, 4, 1, 2].
bids = [3, 4, 1]
bids.add(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.
bids.add(2)
See also
sort