# Cleaning Up Code

**URL:** <https://forum.kirupa.com/t/cleaning-up-code/43780>\
**Category:** flash\
**Created:** [February 25, 2004, 9:42pm UTC](https://forum.kirupa.com/t/cleaning-up-code/43780 "2004-02-25T21:42:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kole](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kole](https://forum.kirupa.com/u/Kole)\
**Post date:** [February 25, 2004, 9:42pm UTC](https://forum.kirupa.com/t/cleaning-up-code/43780/1 "2004-02-25T21:42:34Z")

</div>

Worked on this for a while, does the jpb, but because of the way I have done it, I can’t get any removeMovieClip() functions to work on the new instances . . .

Need it cleaned up an in a way that I can use a removeMovieClip on it and have it actually remove them all.

Very Tired an need a new pair of eyes on this.

```auto

/ **********
* Row One *
********** /
function row_one()
	{
	X = 400;
	Y = 340;
	scale = 100;
	
	for (i; i<3; i++)
		{
		duplicateMovieClip(_root.easy, "row_one"+i, i);
		setProperty ("row_one"+i, _x, X);
		setProperty ("row_one"+i, _y, Y);
		setProperty ("row_one"+i, _xscale, scale);
		setProperty ("row_one"+i, _yscale, scale);
		i++;
		X += 165;
		}
	}

/ **********
* Row Two *
********** /
function row_two()
	{
	X = 205;
	Y = 410;
	scale = 125;
	
	for (ii; ii<3; ii++)
		{
		duplicateMovieClip(_root.easy, "row_two"+i, i);
		setProperty ("row_two"+i, _x, X);
		setProperty ("row_two"+i, _y, Y);
		setProperty ("row_two"+i, _xscale, scale);
		setProperty ("row_two"+i, _yscale, scale);
		i++;
		X += 195;
		}
	}

/ ************
* Row Three *
************ /
function row_three()
	{
	X = 175;
	Y = 500;
	scale = 150;

	for (iii; iii<3; iii++)
	{
		duplicateMovieClip(_root.easy, "row_three"+i, i);
		setProperty ("row_three"+i, _x, X);
		setProperty ("row_three"+i, _y, Y);
		setProperty ("row_three"+i, _xscale, scale);
		setProperty ("row_three"+i, _yscale, scale);
		i++;
		X += 225;
		}
	}

row_one();
row_two();
row_three();

```

I have almost the same code in three different frames, just using different instabnces as the basis for the duplication, and another layer that has a timer, when timer runs out, takes you to the scoreboard, now all was working well before i changed it to duplicate function, I just pulled them in from the library, but they weren’t all the same size an crap (for perspective) But now ehn I get to the scoreboard, the darn things are still running.

Need to kill em off somehow.

Thanx in advance.
