Re: [Flashcoders] static variable in class to keep an array of members

2006-04-07 Thread Manuel Saint-Victor
perfect- thanks. I wanted to make sure that it would not behave funny..ly( i guess that's the word I'm looking for) becuase it's static. On 4/7/06, Janis Radins <[EMAIL PROTECTED]> wrote: > > that is exacly how I am doing this > and i dont see any reason why you shouldnt be doing same ;) > come

Re: [Flashcoders] static variable in class to keep an array of members

2006-04-07 Thread Janis Radins
that is exacly how I am doing this and i dont see any reason why you shouldnt be doing same ;) comeClass { private static var instances:Array = null; public function comeClass(){ if(instances == null){ instances = new Array(); } instances.push(this) } } 2006/4/6, Manuel Saint-Victor <[EMAIL PROTEC

[Flashcoders] static variable in class to keep an array of members

2006-04-06 Thread Manuel Saint-Victor
Is there any reason not to create a static array in a class that is inited when the first instance is created and then keeps an array of all of the class members? I am currently using a helper class to manage that but was looking for a convenient way to serialize the stack of members after some h