Using Director > Parent Scripts > Removing a child object |  |

Removing a child object

You can remove a child object from a movie by setting all variables that contain a reference to the child object to another value. If the child object has been assigned to a list, such as `actorList`, you must also remove the child object from the list. (The `actorList` property is useful for tracking and manipulating the child objects in a movie. For details, see Using actorList.)

To remove a child object and the variables that refer to it:

Set each variable to `VOID`.

Director deletes the child object when there are no more references to it. For example, if `ball1` contains the only reference to a specific child object, then the `statement set ball1 = VOID` deletes the object from memory.

To remove an object from actorList:

Use the `delete` command to delete the item from the list. See `delete`.