# Trash can for dupes

**URL:** https://forum.kirupa.com/t/trash-can-for-dupes/504
**Category:** Uncategorized
**Created:** [July 19, 2002, 6:07pm UTC](https://forum.kirupa.com/t/trash-can-for-dupes/504 "2002-07-19T18:07:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![skee](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@skee](https://forum.kirupa.com/u/skee)
#### Post date: [July 19, 2002, 6:07pm UTC](https://forum.kirupa.com/t/trash-can-for-dupes/504/1 "2002-07-19T18:07:14Z")

</div>

I have made a application where users can select an object, which duplicates and then can be dragged and dropped (leaving the original). Now, I want to add a trash can function to the whole thing. Here is the script it all.  
on (press) {  
if (this.\_name.substr(0, 4) != “dupe”) {  
_root.int\_bldCnt++;  
var str\_trgName = "dupe_"+\_root.int\_bldCnt++;  
this.duplicateMovieClip(str\_trgName, \_root.int\_bldCnt);  
} else {  
var str\_trgName = this.\_name;  
}  
\_root[str\_trgName].startDrag(true);  
}  
on (release, releaseOutside) {  
stopDrag();  
if (this.droptarget == “\_level0.trashcan”) {  
this.removeMovieClip();  
}  
}  
The \_level0.trashcan part is not working. Help anyone? skee
