TweenFilterLite (AS2) (deprecated)
Notice: TweenFilterLite has been deprecated because of the new plugin architecture in TweenLite and TweenMax
There is nothing that TweenFilterLite could do that TweenLite can’t do now with the appropriate plugins activated.
Comments (14)

Jack,
I can only say that I wish you designed and developed vehicles, were in charge of the deficit, and ran an organically based fast food restaurant chain. Because if you did, by now, we would all be flying around in our government issued hover cars that ran on raw sewage and emitted nothing but water vapor while consuming conveniently prepared, organic gourmet meals, which contributed to each of us becoming the healthy, happy, active centurions God intended us to be.
Yes, these classes are that idealistically good. Adobe(Macromedia) should give you millions. I wish that I could, but perhaps a pittance of 10$ will help set a precedence.
This new class seems every bit as brilliant and compact as TweenLite (which I love). Can’t wait to start playing with it. Thank you, thank you, and thank you.
P.S.
Make it easy for people to give you money. Put up a direct PayPal link . Genorosity and laziness aren’t mutually exclusive traits
Great class. I was about to write a function to do this and thought I’d give google a try. Excellent!
Wow!!! You got my fully respect!! D@mn you know something!
It’s working great!! The only thing I don’t know is how to apply a color and a shadow modify at once. Cool though!
Actually, Eagle, it’s pretty simple to apply a colorize filter tween and also a drop shadow tween (or any filter) – just use two tweens and make sure the second one sets the overwrite property to false, like:
TweenFilterLite.to(my_mc, 2, {colorMatrixFilter:{colorize:0xFF0000}});
TweenFilterLite.to(my_mc, 2, {dropShadowFilter:{blurX:5, blurY:5, color:0×00FF00}, overwrite:false});
I’ve been teaching myself as2 & as3, as well as everything else that goes with interactive design… and there’s just some things that take a bit more than understanding the logic to figure out. I’ve been trying to understand the blurs and other filters for DAYS. It’s highly pertinent to a website i’m strying to create. You sir, are a miracle man in my book. Every question I’ve had with this project, you answered in entirety with this one blog alone.
You’re a life saver… more importantly so, a sanity saver
Thank you VERY much for taking the time with this,
C. W. Calabrese
I have been using TweenLite for about a month now and all I can say is that your classes are absolutely brilliant! Thanks a lot!
One thing I’m curious about is how you apply several filters at the same time to an object, lets say you want to move it while adding some glow and removing a drop shadow.
Alex, you should be able to do that without a problem – just remember that unless you set the “overwrite” property to false, TweenLite (and TweenFilterLite) will always overwrite existing tweens of the same object. So to move a MovieClip while adding a glow and removing a drop shadow, you could do something like:
TweenFilterLite.to(my_mc, 2, {glowFilter:{color:0xFF0000, strength:2, blurX:10, blurY:10}, _x:100, _y:300});
TweenFilterLite.to(my_mc, 2, {dropShadowFilter:{alpha:0}, overwrite:false});
I can think of just two more major functions. One would be the ability to pause (all) tweens. This would be wildly useful in some cases. Right now I’m making a video banner which uses vector animations, but people are going to be pausing and playing the video.
Another possibility would be the ability to tween through a timeline animation. I once made an animation of a sunrise which used several motion tweens; the entire animation timeline was then tweened from start to end in a certain time, using a standard quadratic equation. It looked great, and works really well if the animation is long enough (to provide enough frames for low-movement parts of the equation).
Michiel, I have avoiding adding pause/resume functionality to TweenLite in order to keep file size way down, but TweenMax is now officially released and it includes that feature (and many more). Check it out at http://www.TweenMax.com
Also, it’s very easy to do the frame tween you’re talking about. As of version 6, frame tweening is built into TweenLite!
dude.
I’ve been tweening tings for years…I’ve been too complacent with the ol’ lmc_tween.as because you could write two tweens on the one movieclip without the first overwriting the second which I found no other tweener did…I just noticed you’re little snippet of code: overwrite:false in your tweener…You’re a F*&king legend!! I am a better deviner after visiting your website tonight.
Radical
Hey – very cool! One question – is there an easy translation between the numbers you use for the color matrix and the numbers used in flash’s CS3’s built in filter tweener. I have some tweens I want to make to a color, and I have their exact values in flash (example: HUE: -63, SATURATION: 70) – but this doesn’t really translate over to Tweenfilter lite. How best to approximate those values? Nice work!
heaversm, here’s an easy way to match exactly what you created in the Flash CS3 (or Flash
authoring environment in terms of the ColorMatrixFilter. All you need to do is get the necessary values in the matrix array and pass it to the new version of TweenFilterLite (7.04). Here’s some code that grabs those values, traces them to your output window (in case you want to copy/paste), clears the filter, and tweens it back into place after a 1 second delay:
import gs.*;
import flash.filters.*;
function getCurrentMatrix($mc:MovieClip):Array {
var filters:Array = $mc.filters;
for (var i:Number = 0; i < filters.length; i++) {
if (filters[i] instanceof ColorMatrixFilter) {
return filters[i].matrix;
}
}
}
var curMatrix:Array = getCurrentMatrix(mc);
trace(“TweenFilterLite.to(mc, 3, {colorMatrixFilter:{matrix:[" + curMatrix + "]}})”);
mc.filters = []; //clears filters;
TweenFilterLite.to(mc, 3, {colorMatrixFilter:{matrix:curMatrix}, delay:1});
Hey Jack,
Thanks a bunch for TweenLite // TweenFilterLite. They’re both so easy to work with it’s saving me hours of work.
Great Job! Keep it up!
Regards,
The Enemy.







