Oct
26
2008

How to change a tint of the Movie Clip from ActionScript?

Applying a tint from ActionScript is almost as easy as from Flash GUI. All we need to do is to customise setTint property of the Color object and then apply it to the Movie Clip's transform property.

1
2
3
4
5
6
7
import fl.motion.Color;  
//create a Color object
var myColor:Color = new Color();
//set the color of the tint and set the multiplier
myColor.setTint(0xfff000, .75);
//apply the tint to the colorTransform property of the MovieClip
myMovieClip.transform.colorTransform = myColor;

 

Comments 

 
0 #1 Legend 2010-01-11 22:36
Quick and easy, thanks.
Quote
 

AS3 Tips

I'm with Adobe - Facebook group