# Problems with removeMovieClip?

**URL:** <https://forum.kirupa.com/t/problems-with-removemovieclip/114097>\
**Category:** Uncategorized\
**Created:** [June 24, 2004, 6:25pm UTC](https://forum.kirupa.com/t/problems-with-removemovieclip/114097 "2004-06-24T18:25:23Z")\
**Posts on this page:** 1\
**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/114097/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?
