# Problems with removeMovieClip?

**URL:** https://forum.kirupa.com/t/problems-with-removemovieclip/55515
**Category:** Uncategorized
**Created:** [June 24, 2004, 6:25pm UTC](https://forum.kirupa.com/t/problems-with-removemovieclip/55515 "2004-06-24T18:25:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jerez\_z](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@jerez\_z](https://forum.kirupa.com/u/jerez_z)
#### Post date: [June 24, 2004, 6:25pm UTC](https://forum.kirupa.com/t/problems-with-removemovieclip/55515/1 "2004-06-24T18:25:23Z")

</div>

I seem to be having real problems with using removeMovieClip. It just dosen’t seem to work. I have a movie clip I created using attachMovie. I then define the onEnterFrame actions using clip.onEnterFrame = function(). When certain things are true for the clip I want it remove itself. Simple. Except not.

Example:

```auto

_root.attachMovie("clip", "clip", _root.getNextHighestDepth());
clip.onEnterFrame = function() {
	//do stuff
	if(variable == true) {
		this.removeMovieClip();
	}
}

```

But that dosen’t work. Any ideas?

---

<div class="post-metadata">

### Author: ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)
#### Post date: [May 11, 2006, 10:39pm UTC](https://forum.kirupa.com/t/problems-with-removemovieclip/55515/2 "2006-05-11T22:39:22Z")

</div>

I don’t’ think it has to to with depths. Movie clips can be removed with _removeMovieClip_ when there depth is above 0 and below 1048576.

---

<div class="post-metadata">

### Author: ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)
#### Post date: [May 11, 2006, 10:41pm UTC](https://forum.kirupa.com/t/problems-with-removemovieclip/55515/3 "2006-05-11T22:41:49Z")

</div>

:party: :love:
