I am using Flash cs3. I just created a slide transition effect using heart shape masking. I just attach the 25 hearts and increasing their _xscale and _yscale factors to make a transition effect. But the problem i found is, during flash play every thing works fine upto 5th transition. After that there is very slow movement of transitions and the CPU takes 90% of its usage. I removed all movieclips while transitioning. But the transition does not takes as much faster as the 1st transition.
Code:
createEmptyMovieClip("h",0);
i=-1;
k=0;
cmc();
setInterval(anim,50);
function cmc(){
	i++;
	h.attachMovie("img"+i%2,"img"+i,i);
	h.createEmptyMovieClip("mask"+i,i+1000);
	h["img"+i].setMask(h["mask"+i]);
	
}
function anim(){
	var c = h["mask"+i];
	c.clear();
	for(var j=1;j<=5;j++){
		for(var s = 1; s<=5;s++){
	var mc = c.attachMovie("heart","heart"+k+j+s,k+10*j+s);
	mc._x = 30+j*160;
	mc._y = 30+s*120;
	mc._xscale = k/5;
	mc._yscale = k/5;
	}}
	if(k>300){ cmc();
	k=0;
	h["img"+i-1].removeMovieClip();
	h["mask"+i-1].removeMovieClip();
	}
	k+=5;
}
img0,img1,heart are the instance name of the mcs.
What is the misake i made?
I removed previous imgs and masks as well as i clear the mask while start. Then why the flash becomes too slow at the end?

Flash Player 6
AS1