|
-
Senior Member
How to use setTint() -- How to change tint with AS3 -- Informational
I needed help on this but never found anything so I figured it out myself.
Reason I post this is to help anyone else that may need to get this figured out.
Anyway, here it is, how to change tint with a function in AS3:
function tintColor(mc:Sprite, colorNum:Number, alphaSet:Number):void {
var cTint:Color = new Color();
cTint.setTint(colorNum, alphaSet);
mc.transform.colorTransform = cTint;
}
tintColor(sprite1, 0xff0000, .6);
You can also set the mc data type to MovieClip to allow the function to work on movie clips.
If you have any comments and or questions, please feel free to add on to this post.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|