Articles Archive
Director Forums
Director Wiki
Job Board
Search
 
 Director Online WikiMain Page | About | Help | FAQ | Special pages | Log in | Printable version | Disclaimers

Parent Script

From Director Online Wiki

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

Retrieved from "http://www.director-online.com/dougwiki/index.php/Parent_Script"

This page has been accessed 1600 times. This page was last modified 19:43, 9 Apr 2005.