Re: [Flashcoders] recursive question?

2009-01-14 Thread Taka Kojima
hcoders-boun...@chattyfig.figleaf.com] On Behalf Of Taka Kojima > Sent: Wednesday, January 14, 2009 3:09 PM > To: Flash Coders List > Subject: Re: [Flashcoders] recursive question? > > I would probably just do something like... > > private function renderAxis(which:String,

RE: [Flashcoders] recursive question?

2009-01-14 Thread Mendelsohn, Michael
Oh trust me Jason, there's *plenty* more going on besides blank things. :-D - MM Right Taka, thinking the same thing, and I was just assuming he was doing something more (not shown) in the draw function other than just adding the child - otherwise, you're just adding blank things to the screen.

RE: [Flashcoders] recursive question?

2009-01-14 Thread Mendelsohn, Michael
Interesting answers, Jason and Taka. Thanks very much! In migrating to AS3, I guess I have to be reminded about simply removing the child. - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listin

RE: [Flashcoders] recursive question?

2009-01-14 Thread Merrill, Jason
flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Taka Kojima Sent: Wednesday, January 14, 2009 3:09 PM To: Flash Coders List Subject: Re: [Flashcoders] recursive question? I would probably just do something like... private function render

Re: [Flashcoders] recursive question?

2009-01-14 Thread Taka Kojima
I would probably just do something like... private function renderAxis(which:String, doRemove:Boolean = true):void if(doRemove){removePrevious();} switch (which) { case ("X") : xAxis = new Sprite(); addChild(xAxis);

RE: [Flashcoders] recursive question?

2009-01-14 Thread Merrill, Jason
Real quick idea,not tested (the code below could probably be made better with a rest statement - see link below), how about not doing it recursively (because that's why it's calling remove more than once), but doing something like this: import flash.display.Sprite; private function removePrevio