Thanks for the comments Eric... When writing code I was thinking more on the lines of this:
current Coding: var myelement1 = new Element myelement1.alpha = 0; addChild(myelement1); var myelement2 = new Element myelement2.alpha = 0; addChild(myelement2); var myelement3 = new Element myelement3.alpha = 0; addChild(myelement3); var myelement4 = new Element myelement4.alpha = 0; addChild(myelement4); new Idea of coding: private function initElements() : void { var myelement1 = new Element; var myelement2 = new Element; var myelement3 = new Element; var myelement4 = new Element; } private function addToDisplay: void { addChild(myelement1); addChild(myelement2); addChild(myelement3); addChild(myelement4); } during the application controling the "view" of each elment with alpha rather than adding them or removing them from the displaylist.... element1.alpha = 0 element2.alpha = 1 With the second idea when some one looks at the application it might be easier for some one to read it than the first option... On 1/18/08, eric e. dolecki <[EMAIL PROTECTED]> wrote: > > i believe you can remove children from the displayList without destroying > them... which is better than using alpha or visible because alpha and > visibility are still on the as2 "display list" eventhough you cant see em. > > On Jan 18, 2008 5:39 PM, Helmut Granda <[EMAIL PROTECTED]> wrote: > > > I was wondering if anyone knows how much memory any object that is added > > to > > the display list take... for example I have 4 main elements that I need > > during the time the application is running, this 4 main elements contain > > many children so at the time I am adding and deleting items to the > display > > list as needed (addChild). but to make my application more readable I > was > > wondering if I could just have a function that instantiate all the > objects > > and a second method that adds all the elements i need to the display > list > > and then control the elements with the alpha or visible property. > > > > TIA > > > > -- > > ...helmut > > _______________________________________________ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- ...helmut _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders