Changing the color of a MovieClip using ActionScript

Let's say we have a MovieClip called myMovie:


// we need the ColorTransform class from the package geom
import flash.geom.ColorTransform;

// we change its color to red (FF0000)
var myColorTransform:ColorTransform = myMovie.transform.colorTransform;
myColorTransform.color = 0×FF0000;
myMovie.transform.colorTransform = myColorTransform;

myMovie will now be red.