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
yes!! you just made my day and fast as well !! YAY this place rawkz. thx
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
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…
[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 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…
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.