Flash - Change a movie clip’s color using Actionscript 3

That’s right folks. In Actionscript 3, your good old friend setRGB is long gone. But you can still set the color of a movie clip by using the new ColorTransform method.

The first step is simply to import ColorTransform so you can use it in your Flash

import flash.geom.ColorTransform;

Then do the following to change the color of your movie clip (in this case the clip has an instance name of MyMovieClip)

//Change MyMovieClip color to blue (336699)

var newColorTransform:ColorTransform = MyMovieClip.transform.colorTransform;
newColorTransform.color = 0×336699;
MyMovieClip.transform.colorTransform = newColorTransform;

Easy right? Simple! Not too difficult at all! Now go out there and change the color of lots of fun things pal!

Error in my_thread_global_end(): 4 threads didn't exit