# Deleting movie clip

**URL:** https://forum.kirupa.com/t/deleting-movie-clip/246898
**Category:** Uncategorized
**Created:** [December 16, 2007, 1:17am UTC](https://forum.kirupa.com/t/deleting-movie-clip/246898 "2007-12-16T01:17:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![badmonur](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@badmonur](https://forum.kirupa.com/u/badmonur)
#### Post date: [December 16, 2007, 1:17am UTC](https://forum.kirupa.com/t/deleting-movie-clip/246898/1 "2007-12-16T01:17:58Z")

</div>

I have this mc that i would like to be deleted but the removeMovieClip function dosent seem to work on it.

I have this in the frame

```auto
// Location
loc=0;
function placeLoc() {
      if(loc==0){
    duplicateMovieClip(_root.location_mc,"location_mc",1);
  _root.location_mc._x = _root.info_mc._x-10;
   _root.location_mc._y = _root.info_mc._y+65;
   loc=1
       trace(loc)
}else if(loc==1){
    loc=0
//clip to be deleted here
    trace(loc)
}
}

```

and this in the button that displays the clip

```auto
on(press) {
    _root.placeLoc();
    }

```
