hi, just started out trying OOP. I've done some little things but never a full site, so its my first time attempt using the document class. i made a working demo which creates buttons and loads an image from an array when you click one of the buttons, using a button class and a loader class. the array was defined in the document class, but i'd rather it came from an xml file so it could be updated dynamically. the trouble i am having is returning the xml data from my XMLLoaderClass to the DocumentClass to do something with that data. i have an event listener in the XMLLoaderClass to listen for when the xml file has been loaded, but how do i send that processed data back to the DocumentClass to use? i'm having trouble trying to return the value eg. return xmlData; if i send to the XMLLoaderClass constructor a holder for the data and fill it in the constructor, but then if i trace the holder in the document class it is still empty. if i setup a public method for grabbing the xml data then how do i know it has finished loading eg. myXMLLoaderClass.grabXML(); and isn't called too early?
i'll happily post any code but don't want to clog up the email, so if you want it, i'll provide it. i'm pretty sure this is a _very_ basic part of OOP that i am having trouble with or misunderstanding or approaching completely the wrong way, but my copy of Colin Moock's Essential Actionscript 3 (which i'm part way through) is in a box as I have just moved house and i can't find the bit in the pdf version, so i've turned to the list for help. thanks in advance for any help. david _________________________________________________________________ Have more than one Hotmail account? Link them together to easily access both http://clk.atdmt.com/UKM/go/186394591/direct/01/_______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders