Remove movie clip doesnot function

i made a drag & drop action using movie clip. after reaching the target point i want the movieclip to be removed but the action doesnot work instead when i gave the _visible function it works. Help me out.

af = the taget clip
nfs = the clip to be draged
nf = the inital movie clip of nfs

onClipEvent(load) {
clipX = _root.nfs._x;
clipY = _root.nfs._y;

onClipEvent (mouseDown) {

if (this, hitTest(_root._xmouse, _root._ymouse)) {

onClipEvent (mouseUp) {
if (eval(_root.nfs._droptarget) == {
_root.nfs._visible = 0;
} else { = 1;
_root.nfs._visible = 0;
_root.nfs._x = clipX;
_root.nfs._y = clipy;

It probably has to deal with this…




<i>target</i> The target path of a movie clip instance created with <i>duplicateMovieClip</i>, or the instance name of a movie clip created with the <i>attachMovie</i> or <i>duplicateMovieClip</i> methods of the MovieClip object.

…via the AS reference (yes, you, too, should convert to expert mode). When you set the movieclip property <i>visible</i> it just doesn’t show, that’s all. I don’t think Flash recognizes it as gone when visible = 0.


Thanxs for the info, the problem is that i tried to remove movieclip that was already present in the movie. i never knew remove movieclip will work only with movieclip loaded throug attachMovie or duplicateMovieClip actions. Is there any way to disable or remove a movie clip that is alredy present.

Please don’t post twice, efla :trout:

To remove clips that weren’t attached or duplicated, you have to swapDepths them to a positive depths. For instance 100000 (probably empty).

pom :slight_smile: