AS1 OOP: Controlling OOP
         by senocular  

Coming Together With OOP
With all that’s been said and done, we can now begin to see how Flash handles its objects in OOP with Actionscript, most of which revolves around certain automatically assigned properties which handles object interaction.

Functions: Automatic Properties
constructor Reference to the Function Object
__proto__ Reference to Function.prototype
prototype A generic Object instance
Prototype: Automatic Properties
constructor Reference to the Function Object
__proto__ Reference to Object.prototype
Class Instances (new Function()): Automatic Properties
constructor Reference to constructor function
__constructor__ Reference to constructor function
__proto__ Reference to constructor function’s prototype

The big player being __proto__ controlling inherited properties in methods. Also important, though, is __constructor__ for when a class instance is created as a prototype object, that object can then correctly reference the super class for instances of that prototype’s class. Its those two properties that define inheritance for Flash Actionscript 1.0.

 

Prev Page
 



SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple.