# Remove moviclip function

**URL:** <https://forum.kirupa.com/t/remove-moviclip-function/21936>\
**Category:** Uncategorized\
**Created:** [May 28, 2003, 6:09am UTC](https://forum.kirupa.com/t/remove-moviclip-function/21936 "2003-05-28T06:09:28Z")\
**Posts on this page:** 2\
**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 28, 2003, 6:09am UTC](https://forum.kirupa.com/t/remove-moviclip-function/21936/1 "2003-05-28T06:09:28Z")

</div>

this is my 5th attempt to get make simple drag & drop function.  
i have attached the flash file please go thru it and tell me why the remove movie clip function itsnt working.

this is code on the emty\_mc [movie clip on the layer drag] which i want to remove if it is droped on the target[et\_ncf] .

onClipEvent (load) {  
this.attachMovie(“nt\_mc”, ‘graphic’, 1);  
clipX = this.\_x;  
clipY = this.\_y;  
}  
onClipEvent (mouseDown) {  
if (this, hitTest(\_root.\_xmouse, \_root.\_ymouse)) {  
this.attachMovie(“nts\_mc”, ‘graphic’, 1);  
this.startDrag();  
this.dragging = true;  
}  
}  
onClipEvent (mouseUp) {  
stopDrag();  
if (eval(\_root.empty\_mc.\_droptarget) != \_root.et\_ncf) {  
this.removeMovieClip();

```
} else {
	this.attachMovie("nt_mc", 'graphic', 1);
     this._x = clipX;
	 this._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 28, 2003, 9:20am UTC](https://forum.kirupa.com/t/remove-moviclip-function/21936/2 "2003-05-28T09:20:07Z")

</div>

Are you sure that the test returns true?

```auto
if (eval(_root.empty_mc._droptarget) != _root.et_ncf) {
  trace ("hit!");
  this.removeMovieClip();
}

```
