Flash actionscript 3.0: below code is used to change the color to a movie clip on the run time

below code is used to change the color to a movie clip on the run time

Posted by Sankar.G | Posted in | Posted on 12:11 PM

you can change the color of a movie clip at the run time

code:
import flash.geom.ColorTransform;
b1_btn.addEventListener(MouseEvent.CLICK,fun);
var a:colorTransform=movie_mc.transform.colortransform;
function fun(e:Event)
{
a.color=0xff0000;
movie_mc.transform.colortransform=a;
}

this is the way to change the color to an movie clip at the run time
we want to import the color transform library
& we want assign a variable for the color transform and apply movie clip to that variable
and apply some color to the variable a
and apply to the movie clip

Comments (0)