How to remove child(Movieclip) and add to new parent (Movieclip)
Posted
by vineth
on Stack Overflow
See other posts from Stack Overflow
or by vineth
Published on 2009-06-02T11:57:04Z
Indexed on
2010/04/21
0:03 UTC
Read the original article
Hit count: 445
actionscript-3
|flash
Hi, I need to remove the child(movieClip) from the parent(movieClip) while dragging and add the same child(movieClip) to another movieclip when dropped.
this method is used for dragging
function pickUp(event:MouseEvent):void {
event.target.startDrag();
}
when i drop it
function dropIt(event:MouseEvent):void {
event.target.parent.removeChild(event.target); //for removing from previous parent clip
event.target.dropTarget.parent.addChild(event.target); // add to new Moviclip
}
But the clip is not visible or not available while dropping...
Help me to overcome from this Problem.
© Stack Overflow or respective owner