I have a movieclip (childMc) that is the child of another movieclip (parentMc) on the stage. My code creates a reference (refMc) to the child movieclip on the stage, and then deletes the previous parent movieclip (parentMc) through a call to function deleteChild. The problem is that the delete is deleting the reference also. How do I break the reference so that the reference (refMc) is kept on the stage? Here is my code:
Stage Code:
var refMc:MovieClip;
var parentMc:MovieClip=this.addChild(new parentSymbol()); // parentSymbol has childMc inside of it
function deleteChild(e:Event)
{
refMc=parentMc.childMc;
this.removeChild(parentMc);
}
Any help would be appreciated.