Lingo Dictionary > A-C > actorList |  |

actorList

Syntax

    the actorList

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 playback head 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 doesn't 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.

Example

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)

Example

This statement displays the contents of `actorList` in the Message window:

    put the actorList

Example

This statement clears objects from `actorList`.

    the actorList = [ ]

See also

`new()`