(FMX) less processor intensive MC scaling/fading

Hello. I am trying to get 50 rectangular MC’s to scale larger and fade to another color on rollover and rollouts. However, with the code I am using my processor can’t handle it after about 8-10 MC’s have been rollovered. Can anyone offer a better way to do this? Here is my code:

on main timeline frame1:
MovieClip.prototype.fadeColor = function(cto, e, finalWidth, finalHeight, speed) {
var myColor = new Color(this), cColor = myColor.getTransform();
this.onEnterFrame = function() {
this._width += Math.floor((finalWidth-this._width)/speed);
this._height += Math.floor((finalHeight-this._height)/speed);
for (var c in cColor) {
cColor[c] += (cto[c]-cColor[c])/e;
}
myColor.setTransform(cColor);
};
};

on mc’s:
on (rollOver){
_root.test.ball.useHandCursor = false;
_root.test.ball.fadeColor({rb:204, gb:0, bb:0, ab:175}, 5, 200, 200, 10);
}
on (rollOut){
_root.test.ball.fadeColor({rb:0, gb:0, bb:0, ab:170.85}, 5, 134.4, 134.4, 10);
}

Thank you very much.

does it have to be done in actionscript? seems simple enough to be done by creating a simple shape/motion tween and then adding it to a button. no?

I tried doing it without actionscript at first and that seemed to bog down the processor even more. I figured actionscript would be a better way…and it does work a little better.

its not the code, its mostly just the fact that you’re dealing with so many fading clips. Just not going to happen. Flash can’t keep up.

reduce the framerate

would it make any difference using _xscale instead of width or am i having a blonde moment :wink: nah i dunno - never really tried it…

altho sens usually right so i guess not… :frowning: lol

Prophet.