Static constructor syntax in ActionScript-3?

How to determine the static constructor that starts when the class is initialized?

I can not understand:

// version a: {} // version b: static {} // version c: static function Foo() {} // version d: static () {} // version e: () {} // version f: static function Foo():void {} 
+7
source share
1 answer

Found:

 public class Test { public function Test() { trace("normal constructor"); } // static constructor (version a) { trace("static constructor"); } } 

For some reason, they did not ask a question about the static constructor in AS-3?


Dave , I checked: ActionScript initializers do not even need syntax:
 public class Test extends Sprite { trace("hello world"); public function Test() { trace("constructor"); } trace("bye world"); } 
+4
source

All Articles