/ Published in: ActionScript 3
Example usage ...
setTint(ball_mc, "#FF0066");
Expand |
Embed | Plain Text
import com.greensock.*; import com.greensock.plugins.*; TweenPlugin.activate([TintPlugin]); function setTint($mc:MovieClip, $hexString:String):void { var strHexDecimal:String = "0x"+ $hexString.split("#").join(""); var numHexDecimal:Number = parseInt(strHexDecimal, 16); TweenLite.to($mc, 0, {tint:numHexDecimal}); }
Comments
Subscribe to comments
You need to login to post a comment.

NOTE: This seems to produce a colour that isn't it's full value. For example, if the movieclip you are tinting is natually white, then the tinted movieclip will be slightly pale.