Problems with removeMovieClip?

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:


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

But that dosen’t work. Any ideas?

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.

:party: :love: