Slightly faster way to change a DisplayObject's x, y, scaleX, scaleY, and rotation value(s). You'd likely
only see a difference if/when tweening very large quantities of objects, but this just demonstrates
how you can use a TweenPlugin to optimize a particular kind of tween. The trade offs of using this
plugin are:
- It affects x, y, scaleX, scaleY, and rotation (all of them)
- It doesn't accommodate overwriting individual properties. But again, this is an example
of using a plugin for a particular scenario where you know ahead of time what requirements
you're working with.
USAGE:
import com.greensock.TweenLite;
import com.greensock.plugins.*;
TweenPlugin.activate([FastTransformPlugin]); //activation is permanent in the SWF, so this line only needs to be run once.
TweenLite.to(mc, 1, {fastTransform:{x:50, y:300, scaleX:2, scaleY:2, rotation:30}});
Copyright 2010, GreenSock. All rights reserved. This work is subject to the terms in
http://www.greensock.com/terms_of_use.html or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.
changeFactor:Number
[write-only]Implementation
public function set changeFactor(value:Number):void