Thanks man - that did it.... ________________________________________ From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Keith Reinfeld [keithreinf...@comcast.net] Sent: Tuesday, February 23, 2010 12:10 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] Finding and Removing a Sprite: PART II
You could parent them. Var barMom:Sprite = new Sprite(); addChild(barMom); function createBars():void { for (var i:int=0; i<totalbars; i++) { var bar:Sprite = new Sprite(); bar.name = "barBrat"+i; ............... barMom.addChild(bar); { } This way at least you know where they live. Regards, Keith Reinfeld Home Page: http://keithreinfeld.home.comcast.net > -----Original Message----- > From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders- > boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore > Sent: Tuesday, February 23, 2010 10:55 AM > To: Flash Coders List > Subject: RE: [Flashcoders] Finding and Removing a Sprite: PART II > > So here is my next issue... One of the functions creates a dynamic > amount sprites based on an xml feed, like so > > > function createBars():void > { > for (var i:int=0; i<totalbars; i++) > { > var bar:Sprite = new Sprite(); > > ............... > > addChild(bar); > > { > } > > And see this this is where my ears start to bleed... this is seemingly > creating, say, 9 Sprites ALL with the same name "bar".... I need to > keep the new Sprite() line in the loop for them to be created... but > then I need some way to access them to delete them.... > > Any ideas? > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.733 / Virus Database: 271.1.1/2705 - Release Date: > 02/23/10 01:34:00 _______________________________________________ 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