# Tweening.. colors

**URL:** <https://forum.kirupa.com/t/tweening-colors/260941>\
**Category:** Uncategorized\
**Created:** [May 21, 2008, 10:12am UTC](https://forum.kirupa.com/t/tweening-colors/260941 "2008-05-21T10:12:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![user777](https://avatars.discourse-cdn.com/v4/letter/u/9dc877/32.png) [@user777](https://forum.kirupa.com/u/user777)\
**Post date:** [May 21, 2008, 10:12am UTC](https://forum.kirupa.com/t/tweening-colors/260941/1 "2008-05-21T10:12:38Z")

</div>

first post for me here…, hi.

ok i’m trying to learn as3 better. now in as2 i used the laco tween manager (“lmc\_tween.as”) extension in almost every project… now with as3 it doesnt work anymore… (onooos)

the question:

in as2 i could do things like "myMc.colorTo(0xff0000, 3, customEasing, 3)

how would i do that in as3 ? is there a native way or perhaps someone could point me to a extension ?

Many thanks in advance

---

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [May 21, 2008, 11:00am UTC](https://forum.kirupa.com/t/tweening-colors/260941/2 "2008-05-21T11:00:17Z")

</div>

[www.tweenLite.com](http://www.tweenLite.com)

---

<div class="post-metadata">

**Author:** ![user777](https://avatars.discourse-cdn.com/v4/letter/u/9dc877/32.png) [@user777](https://forum.kirupa.com/u/user777)\
**Post date:** [May 21, 2008, 11:09am UTC](https://forum.kirupa.com/t/tweening-colors/260941/3 "2008-05-21T11:09:30Z")

</div>

yes!! you just made my day and fast as well !! YAY this place rawkz. thx

---

<div class="post-metadata">

**Author:** ![tezzutezzu](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@tezzutezzu](https://forum.kirupa.com/u/tezzutezzu)\
**Post date:** [May 21, 2008, 5:43pm UTC](https://forum.kirupa.com/t/tweening-colors/260941/4 "2008-05-21T17:43:43Z")

</div>

I’ve found a workaround using Tweener.

from outside your mc/sprite class: Tweener.addTween(mc.color, {color:0x556688, time:1})

and inside your mc/sprite class

```php

 private var ct:ColorTransform = new ColorTransform();
		
public function set color( value:uint ):void {
			_color =value;
//split the color in channel values
			var red:uint = _color >> 16;
			var green:uint = _color >> 8 & 0xFF;
			var blue:uint = _color & 0xFF;
			Tweener.addTween(ct, {redOffset:red, greenOffset:green, blueOffset:blue, time:2, onUpdate:applyColor});
		}
		
		private function applyColor() {
			this.transform.colorTransform=ct
		}

```

Maybe fan of old caurina could be interested in this. Also if you know other ways…

---

<div class="post-metadata">

**Author:** ![hoolagon](https://avatars.discourse-cdn.com/v4/letter/h/58956e/32.png) [@hoolagon](https://forum.kirupa.com/u/hoolagon)\
**Post date:** [May 21, 2008, 9:57pm UTC](https://forum.kirupa.com/t/tweening-colors/260941/5 "2008-05-21T21:57:34Z")

</div>

[quote=user777;2329037]first post for me here…, hi.

ok i’m trying to learn as3 better. now in as2 i used the laco tween manager (“lmc\_tween.as”) extension in almost every project… now with as3 it doesnt work anymore… (onooos)

the question:

in as2 i could do things like "myMc.colorTo(0xff0000, 3, customEasing, 3)

how would i do that in as3 ? is there a native way or perhaps someone could point me to a extension ?

Many thanks in advance[/quote]  
The AS3 version and next step up from mc\_tween and mc\_tween2 is [Tweener](http://code.google.com/p/tweener/) which allows you to tween any numeric property of any object.  
This could be anything… ie, color, letter-spacing, alpha, frame number, blur filter, etc etc etc. You can even tween multiple objects and properties at once. Quite simply, its the dogs bollox…

---

<div class="post-metadata">

**Author:** ![bonnieraymond](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@bonnieraymond](https://forum.kirupa.com/u/bonnieraymond)\
**Post date:** [August 24, 2008, 5:37pm UTC](https://forum.kirupa.com/t/tweening-colors/260941/6 "2008-08-24T17:37:33Z")

</div>

hexColor Tweening in TweenMax is cool, I love it, but it has a bug in Tweening with Elastic easing, the color seems to be flicked.
