addChildAt(child:DisplayObject, index:int) So:
this.addChildAt(barMom, 0); Regards, Keith Reinfeld Home Page: http://keithreinfeld.home.comcast.net > -----Original Message----- > From: [email protected] [mailto:flashcoders- > [email protected]] On Behalf Of Lehr, Theodore > Sent: Tuesday, February 23, 2010 11:29 AM > To: Flash Coders List > Subject: RE: [Flashcoders] Finding and Removing a Sprite: PART II > > A peculair twist now is that these bar sprites are being sent to the > back (meaning I have other sprites - lines) showing on top when they > were and should showing in the back... imagine if you will a bar chart > - that has horizontal lines in the back... these lines now show on top > of the bars... anyway to force them to be on the bottom "layer"? > > ________________________________________ > From: [email protected] [flashcoders- > [email protected]] On Behalf Of Keith Reinfeld > [[email protected]] > 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: [email protected] [mailto:flashcoders- > > [email protected]] 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 > > [email protected] > > 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 > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ > Flashcoders mailing list > [email protected] > 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 [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

