You want to use bit flags for your constants... http://java.sun.com/docs/books/tutorial/java/nutsandbolts/bitwise.html
(plenty of other tutorials floating around as well, if that don't float yer boat...) -Mark Hawley > From: "eric dolecki" <[EMAIL PROTECTED]> > Date: 2006/03/28 Tue PM 01:44:20 CST > To: "Flashcoders mailing list" <[email protected]> > Subject: [Flashcoders] Architecture opinion... > > I'm about to create an uber-class that is basically something that controls > walkthroughs of various situations. > > I have configuration states... (sets of three basically) > > var CONFIG_1A :Number = 0; // Has item A > var CONFIG_1B:Number = 1; // Has item A and B > var CONFIG_1C:Number = 2; // Has item A and B and C > var CONFIG_2A:Number = 3; // Has item A and D > var CONFIG_2B:Number = 4; // has item A and D and B > ... etc. for quite a number of different configuration options. 15 of them > in total. > > > I am using CONFIG_ for use in if/else statements, etc. but I don't think > this is a very elegant way of doing things. I'd like the code to be readable > & this isn't much better than using simple numerals to set this up. I am > looking for opinions on how to best set this up. Something where if I wanted > to later could add CONFIG_1D and wouldn't have to renumber things. An array > of configs? > > Each config setting will have different paths throughout a "tutorial". What > might be the best way to avoid having switches or if/else statements galore > at each step of the process? > > Thanks - I know this is a strange request :) > _______________________________________________ > [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 > -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) _______________________________________________ [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

