DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Colorize Function

  • submit to reddit
I don't use the flash colorize function much so this is an example of how to colorize a movieclip with a supplied hexnumber


//will turn my_movieClip bright red.
function colorize(c:Number,mc:MovieClip){
  var tf:Transform = new Transform(mc);
  var color_tf:ColorTransform = new ColorTransform();
  color_tf.rgb = c;
  tf.colorTransform = color_tf;