> i need to selectively remove some of the Image's children & maintain
> the newly loaded image at 0 child so stuff can continue to be drawn
> over it. however beyond the initial image load, the new image isn't
> always the 0th child, so i'm having a tough time not removing it as 

i ended up re-doing the child adding bits to name similar child
objects w/the same name (no sure if this will come back to bite me
later but it seems to work now). then when i need to remove specific
stuff:

while(mapImage.getChildByName(what)) {
  mapImage.removeChild(mapImage.getChildByName(what));
}

where "what" is the name of the group of child objects i want to
remove or when i need purge the whole map image before i load a new
source:

for (var i:int=mapImage.numChildren-1; i >= 0; i--) {
 // remove all but the map image
 if(mapImage.getChildAt(i).name.indexOf("FlexLoader") ==-1)
  mapImage.removeChildAt(i);
}

i guess this will do for now.






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to