PDA

View Full Version : problem on itemClick


theGuru
04-29-2009, 12:37 PM
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.

theGuru
04-29-2009, 12:39 PM
How can i load a component through xml.