mint! thanks Jack thats great. And thanks for such a great tool :)

On 8 Jul 2008, at 16:04, Jack Doyle wrote:

You can use TweenMax's ability to tween hex colors and fire an onUpdate
callback that applies the new values, like this (AS3):

import flash.geom.*
import flash.display.*
import gs.*;

var gradientColors:Object = {left:0xFF0000, right:0x0000FF};
var gradientMatrix:Matrix = new Matrix();
gradientMatrix.createGradientBox(100, 100, 0, 0, 0);

function applyGradient():void {,
[gradientColors.left, gradientColors.right], [1, 1], [0, 255],
gradientMatrix, SpreadMethod.PAD);, 0, 100, 100);
applyGradient();, 2, {hexColors:{left:0x00FF00, right: 0x660066},
onUpdate:applyGradient, delay:1});

The same sort of thing can be done in AS2 as well.

You can get TweenMax at


-----Original Message-----
From: Ali Drongo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2008 3:47 AM
To: Flash Coders List
Subject: Re: [Flashcoders] How do you do this? (animating gradient

Thanks for your reply allandt, I can see how TweenLite could tween
the color property of a movie clip but how is the gradient bit achieved?

On 8 Jul 2008, at 09:39, allandt bik-elliott ( wrote:

not entirely sure but it sounds like a tweenmax color matrix tween

take a look at


On Tue, Jul 8, 2008 at 9:20 AM, Ali Drongo

Hiya, how do you think you would do this? Can anyone point me to some
tutorials or give me a snippet?

Flashcoders mailing list

Flashcoders mailing list

Flashcoders mailing list

Flashcoders mailing list

Reply via email to