Actually, using a Getter() method is often preferable too - just depends on how you want to do it.
I will say, I would keep your Questions class as a generic "Model" class - as abstract as possible - and keep the questions external - say in XML or a webservice of some kind- and pass the data to the Questions model class. I wouldn't hard code the data in the class itself. "Classes should contain no information" is a good way to think of it. Jason Merrill Bank of America Learning Technology Solutions >>-----Original Message----- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Mendelsohn, Michael >>Sent: Friday, June 16, 2006 4:56 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] Composition problems >> >>Thanks Jason. I figured it out. I was getting tripped up by the fact >>that how I was doing it was only returning functions, not properties. >> >>In my fixed puzzle class: >> >> private function defineQuestions():Void { >> // create the question and answer data object... >> var QA = new questions(); >> theQuestions = QA.getQuestions(); >> } >> >>In the questions class, getQuestions returns the built object. >> >>But, I like your way better. :-) And, I'll put them in a package, >>thanks. >> >>- MM >> >> >>------------------ >> >> >>Given the way you wote the questions class, then: >> >>//file: puzzle.as >> >>import questions; >> >>class Puzzle { >> private var QA:questions; >> function Puzzle() { >> QA = new questions(); >> trace(QA.qa[0]["q"]) >> } >>} >> >>_______________________________________________ >>Flashcoders@chattyfig.figleaf.com >>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 _______________________________________________ Flashcoders@chattyfig.figleaf.com 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