all groups > flash actionscript > december 2004 >
You're in the

flash actionscript

group:

Programmatically alter movie clip tint


Re: Programmatically alter movie clip tint Ken Fine
12/30/2004 2:00:59 PM
flash actionscript: Hi, jbobbins,

You can certainly adjust color programmatically using Actionscript.

Go buy Joey Lott's ActionScript Cookbook, it discusses all of this in
excellent detail.
Alternately, look on actionscript.org, there are tutorials that will tell
you how to manage this.

-KF


[quoted text, click to view]

Re: Programmatically alter movie clip tint (_seb_)
12/30/2004 6:21:51 PM
changing the alpha is easy, because there is a _alpha as object, but
there is no _tint as object, so it's more complicated.
You need to attach a color object to the MC you want to afffect:

color1 = new Color(_root.mcInstanceName);

Then you can chanmge its color with the action setRGB:

color1.setRGB(0xFF9999);

This will change your "mcInstanceName" MC color from whatever the
original, to the hexadecimal FF9999.
Since there is not one single value that defines a color, but rather a
combination of 6 values (FF9999), I don't think you can programatically
make a gradual color change, i.e. like a tween between red and green,
unless some code genius can prove me wrong.



[quoted text, click to view]
Programmatically alter movie clip tint jbobbins
12/30/2004 9:58:36 PM
Hello all, I have been looking for a way to programmatically (in ActionScript
of course) alter a movie clip's tint (color and percent). I have been
unsuccessful. I was wondering if anyone knows of a way to do it (and where I
might find some documentation on it), or at least knows if it is impossible, so
I can stop looking. Thanks.
AddThis Social Bookmark Button