Masking question new question

I have another question that I need help with. I have the program running and it works very well. Initially the mask is removed very smoothly. The problem I have is that each time the movie repeats the mask that is removed becomes more and more jumpy. It is like the memory is full or the program is working harder and harder as the program repeats itself. As I have mentioned in previous posts the masking is based on the tutorial: http://www.actionscript.org/resources/articles/168/1/Dynamic-masking-using-the-drawing-API/Page1.html The program is repeated by having the timeline go to frame 1. All of the program resides in frame 2. I attempted to remove all of the movieclips and the array that have been put into the movie by actionscript. I think the removal works because I have tested it using the trace command.

replay.onRelease = function () {
_root.empty_mc.masked.removeMovieClip();
for (i=0;i<117;i++){
_root[“mc”+i].removeMovieClip();
}
delete mcArray;
_root.square.removeMovieClip();
_root.square.clear();
gotoAndPlay(1);
};

Can someone suggest something that I am missing. Or possibly a better way to have the movie replay which will clear all variables, movieclips and memory.

Thanks so much … Michael