# Indestructable movie clip

**URL:** <https://forum.kirupa.com/t/indestructable-movie-clip/11538>\
**Category:** Uncategorized\
**Created:** [January 18, 2003, 8:10pm UTC](https://forum.kirupa.com/t/indestructable-movie-clip/11538 "2003-01-18T20:10:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yollo](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@yollo](https://forum.kirupa.com/u/yollo)\
**Post date:** [January 18, 2003, 8:10pm UTC](https://forum.kirupa.com/t/indestructable-movie-clip/11538/1 "2003-01-18T20:10:19Z")

</div>

try as i might i can’t get this movie clip to remove. i’ve tried commanding it to remove from the main timeline and nothing happened. now i’ve attached this code to the clip itself and it still won’t go. it works fine for other clips in the movie:

onClipEvent (enterFrame) {

```
if (this._x&lt;50) {
	this.removeMovieClip();
}
if (this._x&gt;750) {
	this.removeMovieClip();
}
if (this._y&lt;50) {
	this.removeMovieClip();
}
if (this._y&gt;350) {
	this.removeMovieClip();
}

```

}

i’ve done this lots of time before and it worked fine. there must be something weird about the clip.

---

<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:** [January 18, 2003, 8:16pm UTC](https://forum.kirupa.com/t/indestructable-movie-clip/11538/2 "2003-01-18T20:16:56Z")

</div>

The only way you can use removeMovieClips is if you use duplicateMovieClips to make that movieCLip…

If you wanna get rid of a movieClip that you just had laying on the screen already… Use this.\_visible = false; That will make it invisible so you can’t see it anymore…

I hope this helped… Peace

---

<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:** [January 18, 2003, 9:08pm UTC](https://forum.kirupa.com/t/indestructable-movie-clip/11538/3 "2003-01-18T21:08:10Z")

</div>

yup, that must be it. that is indeed the only clip i had laying on the stage. didn’t realize that was a problem.

thanks!

---

<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:** [January 18, 2003, 10:11pm UTC](https://forum.kirupa.com/t/indestructable-movie-clip/11538/4 "2003-01-18T22:11:15Z")

</div>

No Problem Man…

Glad I could help 🙂

---

<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:** [January 18, 2003, 10:39pm UTC](https://forum.kirupa.com/t/indestructable-movie-clip/11538/5 "2003-01-18T22:39:34Z")

</div>

removemovieclip works on any clip… any clip with a depth \>= 0. clips placed on the stage manually have a negative depth, something around -16000. Because they have a negative depth, removemovieclip will not work with them. Attaching or duplicating a clip to a negative depth will also disable removemovieclip. With this being the case, all you need to do is use swapdepths on a movieclip to bring it too a depth \>= 0 so it can be removed - and this accounts for all movieclips, even those manually placed on the screen in the Flash authoring environment. So to remove any clip use

myClip.swapDepths(0);  
myClip.removeMovieClip();

---

<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:** [January 19, 2003, 8:20am UTC](https://forum.kirupa.com/t/indestructable-movie-clip/11538/6 "2003-01-19T08:20:35Z")

</div>

Well that’s an easy way of knowing that…

Interesting too… But most movies you duplicate you make sure the depths are over 0 anyways… At least I always did… =)
