Hi
I am using the following code to addChild.
for (var j:int = 0; j < nomePostosArray.length; j++) {
if (distritoPostosArray[j]==distritosCB.selectedLabel&&localidadePostosArray[j]==localidadesCB.selectedLabel) {
var MA:MovieClip = new mc();
namelistscroller.text.addChild(MA);
MA.name="newsMc"+j;
trace("newsMc"+j);
MA.y=MA.height*vezes+MA.y+20*vezes;
trace(MA.y);
MA.nome.text=j+". "+nomePostosArray[j];
MA.morada.text=moradaPostosArray[j];
MA.codigo.text=codigoPostosArray[j];
MA.contacto.text=contactosPostosArray[j];
MA.mapLink="http://www.symbolbox.pt";
MA.addEventListener(MouseEvent.CLICK, gotoURL);
vezes++;
}
}
This adds alot of boxs. How can I erase all the addChilds with one function?
Thanks