Add & detach library from stage

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.