# Remove movie clip doesnot function

**URL:** <https://forum.kirupa.com/t/remove-movie-clip-doesnot-function/21838>\
**Category:** Uncategorized\
**Created:** [May 27, 2003, 4:42am UTC](https://forum.kirupa.com/t/remove-movie-clip-doesnot-function/21838 "2003-05-27T04:42:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![efla](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@efla](https://forum.kirupa.com/u/efla)\
**Post date:** [May 27, 2003, 4:42am UTC](https://forum.kirupa.com/t/remove-movie-clip-doesnot-function/21838/1 "2003-05-27T04:42:58Z")

</div>

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)) {
	startDrag(this);
}

```

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 27, 2003, 6:53am UTC](https://forum.kirupa.com/t/remove-movie-clip-doesnot-function/21838/2 "2003-05-27T06:53:12Z")

</div>

It probably has to deal with this…

> 

\<u\>Usage\</u\>

removeMovieClip(\<i\>target\</i\>)

\<u\>Parameters\</u\>

\<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.

Anyway,  
–Elios

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2003, 4:59am UTC](https://forum.kirupa.com/t/remove-movie-clip-doesnot-function/21838/3 "2003-05-28T04:59:25Z")

</div>

Hai,  
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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2003, 10:08am UTC](https://forum.kirupa.com/t/remove-movie-clip-doesnot-function/21838/4 "2003-05-28T10:08:26Z")

</div>

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 🙂
