Oct
26
2008

How to change tint of the Movie Clip from Action Script?

Applying tint from Action Script is almost as easy as from Flash GUI. All we need to do is to customize setTint property of 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