Packagecom.greensock.plugins
Classpublic class RoundPropsPlugin
InheritanceRoundPropsPlugin Inheritance TweenPlugin Inheritance Object

If you'd like the inbetween values in a tween to always get rounded to the nearest integer, use the roundProps special property. Just pass in a comma-delimited String containing the property names that you'd like rounded. For example, if you're tweening the x, y, and alpha properties of mc and you want to round the x and y values (not alpha) every time the tween is rendered, you'd do: TweenMax.to(mc, 2, {x:300, y:200, alpha:0.5, roundProps:"x,y"});

USAGE:

import com.greensock.TweenMax; 
import com.greensock.plugins.RoundPropsPlugin;
TweenPlugin.activate([RoundPropsPlugin]); //activation is permanent in the SWF, so this line only needs to be run once.
TweenMax.to(mc, 2, {x:300, y:200, alpha:0.5, roundProps:"x,y"}); 

Copyright 2008-2013, GreenSock. All rights reserved. This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for Club GreenSock members, the software agreement that was issued with the membership.



Public Methods
 MethodDefined By
 Inherited
activate(plugins:Array):Boolean
[static] Activates one or more plugins so that TweenLite and TweenMax recognize the associated special properties.
TweenPlugin