AS ease Equation help

I have about 15 movie clips in a movie that i want to scale with ease. Ive tried doing this a number of different ways. all of which have woked but they severely slow down the perfomance of my site.

ideally i would like to use penners equations

I want to have a function on the first frame of the main timeline

i.e


#include "easing_equations.as"
/////////////////////////////////////

function doScale() {
	callback_txt.text = "";
	//
	var w = parseFloat(destw_txt.text);
	var h = parseFloat(desth_txt.text);
	var dur = parseFloat(dur_txt.text);

	square_mc.scaleClip("easeInOutCubic", w, h, dur);
	//callback event invoked when tweening is done
	square_mc.onScaleDone = function() {
		delete this.onEnterFrame;
	//	callback_txt.text = "callback - scaling done";
	};
}

then call the function like this:


square_mc.scaleClip("easeOutCubic", 300, 150, 30);

but i want to have it delete this.onEnterframe
when the scale is complete.

can anybody help set up this function properly so it doesnt bog down the processor?

Prototypes do not attach code to every movieclip. Prototypes make code available to every movieclip, but that doesn’t mean every movieclips automatically executes it. They only execute it when you tell them to.

12 mc’s is quite a lot of movieclips to apply scripted motion on. Have you tried increasing your framerate ? At the default of 12fps, every animation looks choppy. We see an animation as smooth from 24-25fps. I mostly use 40fps.

If your framerate is ok, I don’t think there’s anything you can do to fix it, besides making less movieclips ease. Maybe Robert Penner’s code is more CPU friendly, I don’t know.