I am new to actionscript but have been trying to load external data such as an XML file.

I have managed to get the data to load up just fine but what i want is to then move to another frame by the click of a button and have the XML data disappear. So far, only the background that the data sits in disappears and the data is left in blocks.

The data sits inside separate movie clips (created dynamically in as3).

i have tried removeChild(clip_mc); but this only gets rid of 1 of the movie clip containers.

I want all the data to disappear on the click of a button....here is the code i am using.....with comments....

var yPlacement:int = 130;

var xPlacement:int = 200;

var distance:int = 80;

var myXML:XML = new XML();
var XML_URL:String = "f1news.xml";
var myXMLURL:URLRequest = new URLRequest(XML_URL);
var myLoader:URLLoader = new URLLoader(myXMLURL);
myLoader.addEventListener("complete", xmlLoaded);

function xmlLoaded(event:Event):void {

// Place the xml data into the myXML object
myXML = XML(myLoader.data);
// Initialize and give var name to the new external XMLDocument
var xmlDoc:XMLDocument = new XMLDocument();
// Ignore spacing around nodes
xmlDoc.ignoreWhite = true;
// Define a new name for the loaded XML that is the data in myLoader
var menuXML:XML = XML(myLoader.data);
// Parse the XML data into a readable format

for each (var item:XML in myXML..item){

// Access the value of the "itemColor" node in our external XML file
var newstitle:String = item.title.toString();

var description:String = item.description.toString();


// This all pertains to the style of the Box that holds each person
var rect:Shape = new Shape;
var color:Number = Number("0xC8C8C8");
rect.graphics.lineStyle(1, 0x999999);
// Draw the Box
rect.graphics.drawRect(0, 0, 600, 70);

// This all pertains to the text fields that give our boxes their labels, alter values to your liking
var myText1:TextField = new TextField();
myText1.text = newstitle;
myText1.autoSize = TextFieldAutoSize.LEFT;
myText1.x = 2;
myText1.y = 2;

// This all pertains to the text fields that give our boxes their labels, alter values to your liking
var myText2:TextField = new TextField();
myText2.text = description;
myText2.autoSize = TextFieldAutoSize.LEFT;
myText2.x = 2;
myText2.y = 20;

// Create MovieClip holder for each box graphic and text labels to organize everything into container
var clip_mc = new MovieClip();
// Add the rectangle graphic
// Add the text fields
// Put the new movieClip on stage now

// Now apply it in its offset Y position to the stage
clip_mc.y = yPlacement;
// X position that it will be placed on stage
clip_mc.x = xPlacement;
// Offset each one in the loop to make sure they don't just get put right on top of each other
yPlacement = yPlacement + distance;


close_btn.addEventListener(MouseEvent.CLICK, end);

function end(event:MouseEvent):void



Basically every time i click the close_btn it is removing the last movie clip on the list of data but i want it to remove all 7 and all the external data from the XML file.

I hope you understand, its a little difficult to explain
If anyone can help i would really appreciate it, i am really struggling with this...