Quote:
Creating inheritance
All functions have a prototype property that is created automatically when the function is defined. When you use a constructor function to create a new object, all the properties and methods of the constructor's prototype property become properties and methods of the __proto__ property of the new object. The prototype property indicates the default property values for objects created with that function. Passing values using the __proto__ and prototype properties is called inheritance.
Inheritance proceeds according to a definite hierarchy. When you call an object's property or method, ActionScript looks at the object to see if such an element exists. If it doesn't exist, ActionScript looks at the object's __proto__ property for the information (object.__proto__). If the called property is not a property of the object's __proto__ object, ActionScript looks at object.__proto__.__proto__.
Here's Colin Moock's 2 functions that