On 05/04/2011 06:48, Kevin Newman wrote:
Hey all,
A long while ago I read that the constructor is interpreted, unlike
the rest of the class methods, which are compiled. Is that still true?
thanks,
Kevin N.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Hi,
I am not sure about the "interpreted" bit - I can't remember to
well, but Colin Moock's AS3 book mentioned not putting too much code in
a constructor because of some constraint on the system - instead you
should farm out initialization to another function, e.g.
public class MyClass {
public function MyClass() {
_init();
}
private function _init():void {
trace("doing lots of setup");
//...
trace("finished setup...");
}
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders