# Cleaning the stage?

**URL:** <https://forum.kirupa.com/t/cleaning-the-stage/139434>\
**Category:** Uncategorized\
**Created:** [March 3, 2005, 12:26am UTC](https://forum.kirupa.com/t/cleaning-the-stage/139434 "2005-03-03T00:26:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![frost\_oni](https://avatars.discourse-cdn.com/v4/letter/f/94ad74/32.png) [@frost\_oni](https://forum.kirupa.com/u/frost_oni)\
**Post date:** [March 3, 2005, 12:26am UTC](https://forum.kirupa.com/t/cleaning-the-stage/139434/1 "2005-03-03T00:26:10Z")

</div>

Hello, everyone. I need some help. I have a stage that’s filled with dynamically generated isometric objects [in the shape of a smiley, placed according to an array], and when i click a button, i would like the stage to be cleared, then another frame with another isometric code and another array to load.

The problem i am facing now is that the items positionned from the smiley are still on the stage if the next array is smaller than the previous one. Do you guys/gals know of any way i could clear the stage before going on the next frame? Currenlty, i tried unloadMovieNum(depth) in between with this code:

```auto

n = 50;
onEnterFrame = function(){
	trace(n);
	n--;
	unloadMovieNum(n);
	if ( n<=0){
		nextFrame();
	} else { stop(); }
}

```

What happens is that it clears the stage, but doesnt load anything in teh following frame.

I hope that i was clear. If any confusion prevails, please answer the questions that linger in your minds.

Thank you in advance.
