if (theData.hasOwnProperty("@id1")) {
var myObj:Hello = new Hello();
textArea.visible = false;
panel.addChild(myObj);
} else if (theData.hasOwnProperty("@id2")) {
textArea.visible = false;
var vijay:MCQ = new MCQ();
panel.addChild(vijay);
}
When i click on the next item, the previous window is still visible. How can i destroy myObj. I am not able to do it through removeChild.