I neglected to mention this important point in OOP4AS2#2 – when creating array or object properties for classes, you must initialize them in your constructor as with “goodList” below. The “badList” array property below will share the same data amongst all instances of the class:
class MyList { var goodList:Array; var badList:Array = new Array(); MyList = function() { goodLlist = new Array(); } } |
Bokel has a good description of the issue, with some sample code here.
