Parent Script

From Director Online Wiki
Jump to: navigation, search

One of the two types of Object Oriented script available in Director. The other type is the behavior. The only technical difference between a parent script and a behavior is that parent scripts do not appear in the Behavior Inspector during authoring.

Parent Scripts are of no consequence to non-programming Director users. They are used by pure Object Oriented programmers as a way to create objects.


To create an object in Lingo, you would first need to have a parent script to define the class of object. The parent script can contain:

  • 'Property declarations - to add member properties
  • A new handler - the constructor
  • Member functions methods for the object

You can then instantiate the object using the following syntax:

   myObject = script( "Parent Script Name" ).new( <parameters to new handler> )

See Also

new rawNew