# Help with removing dynamic movieclip loaded form library

**URL:** <https://forum.kirupa.com/t/help-with-removing-dynamic-movieclip-loaded-form-library/274485>\
**Category:** Uncategorized\
**Created:** [October 30, 2008, 4:24pm UTC](https://forum.kirupa.com/t/help-with-removing-dynamic-movieclip-loaded-form-library/274485 "2008-10-30T16:24:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lemasterjg](https://avatars.discourse-cdn.com/v4/letter/l/a698b9/32.png) [@lemasterjg](https://forum.kirupa.com/u/lemasterjg)\
**Post date:** [October 30, 2008, 4:24pm UTC](https://forum.kirupa.com/t/help-with-removing-dynamic-movieclip-loaded-form-library/274485/1 "2008-10-30T16:24:59Z")

</div>

[COLOR=black]I’ve recently switched over from AS2 to AS3, I’m rebuilding my website to be AS3 compatible and giving everything an overhaul in layout, design, and organization of material. [/COLOR]

[COLOR=black]my site is going to be set up with several main buttons, each one adds a movieclip that is held in the library to a holder movieclip that is in the middle of the stage. My problem now is how to remove an old movieclip form the holder once a new movieclip has been added to the holder[/COLOR]

here is my code so far:

```auto

import flash.display.MovieClip;
import flash.events.MouseEvent;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
 
this.mc_1_btn.buttonMode = true;
this.mc_2_btn.buttonMode = true;
this.mc_3_btn.buttonMode = true;
 
this.mc_1_btn.addEventListener(MouseEvent.CLICK,button_1_click);
this.mc_2_btn.addEventListener(MouseEvent.CLICK,button_2_click);
this.mc_3_btn.addEventListener(MouseEvent.CLICK,button_3_click);
 
function button_1_click(e:MouseEvent):void {
 var page1:clip_1_mc = new clip_1_mc;
 container(page1);
}
function button_2_click(e:MouseEvent):void {
 var page2:clip_2_mc = new clip_2_mc;
 container(page2);
}
function button_3_click(e:MouseEvent):void {
 var page3:clip_3_mc = new clip_3_mc;
 container(page3);
}
 
function container(Page):void {
 var PageHeight:Number = Page.height;
 var PageWidth:Number = Page.width;
 Page.alpha = 0;
 fadeIn(Page, PageHeight, PageWidth);
}
 
function fadeIn(Clip,ClipHeight,ClipWidth):void {
 this.mc_holder_mc.addChild(Clip);
 var FadeINTween:Tween = new Tween (Clip,"alpha",Regular.easeInOut,Clip.alpha,100,3,true);
 var ScaleXTween:Tween = new Tween (Clip,"width",Regular.easeInOut,(ClipWidth*1.5),ClipWidth,.5,true);
 var ScaleYTween:Tween = new Tween (Clip,"height",Regular.easeInOut,(ClipHeight*3),ClipHeight,.5,true);
}
 
stop();

```
