Hello,

Could any soul out there help me understand why the __constructor__ and
__proto__ are used in the following code:

class Application {

   public static var instance:Application;

   private function Application(createdBy)
   {
       createdBy.__proto__ = this.__proto__;
       createdBy.__constructor__ = Application;
       this = createdBy;
   }

   public static function main(createdBy:MovieClip){
       if(instance == null)
           instance = new Application(createdBy);
       return instance;
   }
}


//then in the main file

Application.main(this);

For what I undertand this code is used to assign the whole application to
_root but i was looking for a better understanding of "constructor and
proto" here.

TIA!
...helmut
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to