# Add & detach library from stage

**URL:** <https://forum.kirupa.com/t/add-detach-library-from-stage/323680>\
**Category:** Uncategorized\
**Created:** [July 12, 2011, 12:31pm UTC](https://forum.kirupa.com/t/add-detach-library-from-stage/323680 "2011-07-12T12:31:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![graphicguru](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@graphicguru](https://forum.kirupa.com/u/graphicguru)\
**Post date:** [July 12, 2011, 12:31pm UTC](https://forum.kirupa.com/t/add-detach-library-from-stage/323680/1 "2011-07-12T12:31:18Z")

</div>

Hi,  
I have a situation, One object reference in no.of swf’s the object handle from main swf.  
I have a movieclip in library want to place on stage there are no.of movieclips in library with some icons repeated. the icons are having the instance. the help i need is  
how to attach movieclip from library on to the stage and detach or change with other movieclip from library on to the same position. this movieclip loads with each swf load on main movie

first swf loads movieclip from library  
var legndpopup:MovieClip= new legndpopup\_one();  
addChild(legndpopup);  
legndpopup.x = 600;  
legndpopup.y = 130;

second swf loads movieclip from library should replace with other here i need help.  
var legndpopup:MovieClip= new legndpopup\_two();  
addChild(legndpopup);  
legndpopup.x = 600;  
legndpopup.y = 250;

i can explain more detailed.
