-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 James Tu wrote: > If you have a class variable that is of type Array... > DO NOT DO THIS: > private var ListOfThings:Array = new Array(); > > DO THIS: > private var ListOfThings:Array; > //then in your constructor, do this > ListOfThings = new Array();
General "best practices" in many object oriented environments tell you to save your initialization until the constructor. I never thought about it much, but your experience with weird static shared funk could probably be where the rule of thumb originated. I'm not terribly surprised to hear that AS2 behaves this way. I suspect this is an artifact of its ugly AS1 prototyping ancestry ;) Ammon -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVhzOR9XALM4wLEoRAmiZAJ0aK45/zFKyBhKJqaICuLA6aDf2zQCeO0Pi MZ8WA5hGdpC7DWESbtUfirs= =tCOX -----END PGP SIGNATURE----- _______________________________________________ [email protected] 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

