[Golist] HydroTween Color Matrix solutions
donovan at hydrotik.com
donovan at hydrotik.com
Fri Aug 8 15:30:28 PDT 2008
Just to avoid confusion... And I'm sure it will come up again (just so you
know I opted to leave it in for people using already using the RESET const.
At some point I might remove it)
HydroTween.RESET has been deprecated. It only worked for the "color" prop.
(it will continue to still work, but only on the color prop)
HydoTween.IDENTITY will reset every ColorMatrix filter. This is the current
and correct way to reset.
And thanks man!
:)
On 8/8/08 6:06 PM, "Shane Colella" <scolella at qorvis.com> wrote:
> Ah ha, as i just tried reset and it didnt work...
> Thanks donavan...
> Hydro rocks....
>
>
> -------------------------------------
> -----------------------
> Shane Michael Colella | Director
> Qorvis Communications
> 571-271-3453 mobile
> 703-744-7806 phone
> 703-744-7840 fax
> scolella at qorvis.com
>
>
> ----- Original Message -----
> From: golist-bounces at goasap.org <golist-bounces at goasap.org>
> To: Mailing list for the Go ActionScript Animation Platform
> <golist at goasap.org>
> Sent: Fri Aug 08 17:59:42 2008
> Subject: Re: [Golist] HydroTween Color Matrix solutions
>
> Reset to the original color using HydroTween.IDENTITY in the latest version.
>
> This will remove ANY CM tweens you have running on an Object.
>
>
>
>
>
>
> Also if you ran a couple CM tweens on an item and you want to tween to just
> one CM prop you can do...
>
> HydroTween.go(this, {contrast:1, saturation:1}, 1, 0, Quartic.easeOut);
> HydroTween.go(this, {color:0xFF0000}, 1, 0, Quartic.easeOut);
> HydroTween.go(this, {contrast:1, saturation:HydroTween.IDENTITY}, 1, 0,
> Quartic.easeOut);
>
> This will reset the object color to it¹s original state then apply the
> contrast adjustment so you wind up tweening to the contrast value from
> whatever the modified CM values have become. Make sure you put the IDENTITY
> const last in the list of props! This is a hack trick that takes advantage the
> a loop of objects runs in reverse so the resetting takes place first, then the
> adjustments to the ColorMatrixFilter happen after.
>
>
>
>
>
>
> On 8/8/08 4:00 PM, "Shane Colella" <scolella at qorvis.com> wrote:
>
>
>
> Greetings everyone,
>
> I¹m currently working on a photo gallery which I have a line of
> pics that display one after another. I¹m sliding the line around depending on
> which pic has been selected. The transitions are where I¹m running into
> difficulty. I¹m using HydroTween to de-saturate and then saturate the images,
> with the following code:
>
> public function set inColor(bool:Boolean):void{
>
> if(bool!=_inColor ||
> !_setColor){
> trace("\n\t -- set
> color : "+_index);
> _inColor = bool;
> _setColor = true;
> if(_inColor){
> //--add color
>
> HydroTween.go(this, { saturation:2.8}, 1, 0, Quartic.easeOut);
> }else{ //--remove
> color
>
> HydroTween.go(this, { saturation:-0.9}, 1, 0, Quartic.easeOut);
> }
> }
> }
>
> What¹s interesting is the numbers I¹ve had to use to get it to ³kinda² work.
> I realize that the colorMatrix is involved so technically we are adding
> filters one after another, which eventually, if I keep going back and forth,
> completely de-saturates the images.
> My question:
> Is there a clean way anyone has used to ³reset² the filters so I¹m not
> cumulatively adding filters onto my pics. Basically, I want to be able to
> just set saturation to 1, and let it display normal, and set it to -1 to
> de-saturate, but that¹s not working at all.
>
> Any thoughts from the team?
>
> I decided to post here feeling this may be a pretty common problem with the
> colorMatrix side of HydroTween if one is just trying to go back and forth from
> the same effect, in this case saturation
>
> Thanks
>
>
>
>
> Shane Michael Colella
>
>
>
> ________________________________
>
> _______________________________________________
> GoList mailing list
> GoList at goasap.org
> http://goasap.org/mailman/listinfo/golist_goasap.org
>
>
>
>
> _______________________________________________
GoList mailing
> list
GoList at goasap.org
http://goasap.org/mailman/listinfo/golist_goasap.org
More information about the GoList
mailing list