[FMX] removeMovieClip ()

hi all

here it is a function wich give a cool effect, i taked it on another forum (www.flashxpress.net):

maxClips = 10;
 
 i = 1;
 
 sprite._visible = false;
 
 function remanence() {
 
 	if (i<maxClips) {
 
 		sprite.duplicateMovieClip("sprite"+i, -i);
 
 		_root["sprite"+i]._xscale = _root["sprite"+(i-1)]._xscale+40;
 
 		_root["sprite"+i]._yscale = _root["sprite"+(i-1)]._yscale+40;
 
 		i++;
 
 	} else {
 
 		clearInterval(latence);
 
 	}
 
 }
 
 latence = setInterval(remanence, 40);
 

i’m not good enough in AS to remove correctly the effect on the next frame. I tried several code without results. A cool guy gave me another one:

maxClips = 10;
 
 for (var i = 1; i<maxClips; i++) {
 		_root["sprite"+i].removeMovieClip () ;
 } ;
 

but it’s still doesn’t work.
That’s why i’m here, is there someone who can write the right code for remove all the movieclip generated by the function?
If u do it, thanks a lot lot lot.