[F5] Tinting with AS?

Is it possible to change the color of a b/w movieclip with AS in flash 5?

Thx in advance…

yes, anything you can do in the effects panel, you can do in scripting. If you dont know the extents of the capabilities of the effects panel, make a symbol and open the panel and play with it. If you can get the desired result there, you can get it in script too. For photographic images you can go as far as reversing and even embosing but what you cant do in flash is convert a full color image into grayscale or a grayscale image into full (multi) color - as nothing would really be able to do that since theres no way to tell what gray value is what color in the first place. But in terms of color, Flash can do most of everything else.

What functions should i look up if I wanted to do an effect similar to tint in the effects panel?

theres something called the Color object. Its under C in flash help

you set a color object using a variable and passing in the name of a movieclip you want to control the color of i.e.

colorChanger = new Color(_root.myMovieClip);

then colorChanger is this crazy color object thingy which, when functions are applied to it (like setRGB and setTransform) it effects the color of that movieclip.

setTransform is the function you’ll need to play with. Its values are exactly those seen in the “advanced” selection in the effects panel. In fact, you can set the advanced settings on a movieclip in flash, then use getTransform on a color object you set for that movieclip and see how each variable compares to those settings.

Thank you very much! :slight_smile: