To download the code, you must agree to the following license:

Copyright 2010, GreenSock, Inc.

"NO CHARGE" NON-EXCLUSIVE SOFTWARE LICENSE AGREEMENT
-----------------------------------------------------------------------------
PLAIN ENGLISH SUMMARY:

  1. You may use the code at no charge in commercial or non-commercial web sites, games, components, applications, and other software as long as end users are not charged a fee of any kind to use your product or gain access to any part of it. If your client pays you a one-time fee to create the site/product, that's perfectly fine and qualifies under the "no charge" license. If end users are charged a usage/access/license fee, please sign up for a corporate Club GreenSock membership which comes with a special commercial license granting you permission to do so. See http://www.greensock.com/club/ for details.
  2. Use at your own risk. No warranties are offered.
  3. Please respect the copyright.

-----------------------------------------------------------------------------

LEGALESE:

This is a legal agreement between you (either an individual or a single entity) and GreenSock, Inc. ("GREENSOCK") for the proprietary GreenSock ActionScript code known as TweenLite, TweenMax, TweenNano, TimelineLite, TimelineMax, LoaderMax, and other code that is available for download at http://www.greensock.com (this code and documentation, as well as any updates which may at GREENSOCK's sole discretion be provided to you from time to time, are referred to in this Agreement as "PROGRAM") By downloading, copying, or otherwise using the PROGRAM, you agree to the terms and conditions of this Agreement. If you do not agree to the terms and conditions of this Agreement, please do not download or use the PROGRAM.

I. LICENSE
A. Subject to the terms and conditions of this Agreement, GREENSOCK hereby grants you a non-exclusive, worldwide, non-transferable right to use the PROGRAM in web sites, games, components and other software applications for which the end user is NOT charged any fees. If you would like to use the code in a commercially licensed software product for which end users are charged a fee (either for usage or access), simply sign up for a corporate Club GreenSock membership at http://www.greensock.com/club/.

II. LIMITATION OF LICENSE AND RESTRICTIONS
A. You agree that you will not disclose, sell, rent, or license the PROGRAM's source code or any derivative works thereof to any third party without the prior written consent of GREENSOCK. Derivative works are defined as modifications that add substantive functionality to the PROGRAM and do not include bug fixes or other minor modifications required to operate the PROGRAM as originally intended. Distribution of the source code as part of your Work Product is acceptable so long as the recipients agree to the terms of this Agreement. You agree not to modify or delete GREENSOCK'S existing copyright notice located in the source code.

B. You may use, duplicate, and distribute the compiled object code as embedded in a Work Product created by you, either for your own use or for distribution to a third party so long as end users of the Work Product are not charged a fee for usage of or access to any portion of the Work Product. Please see http://www.greensock.com/licensing/ for descriptions of Work Products that qualify for the "No Charge" license.

III. CONSIDERATION
A. The license rights granted to you under this Agreement are at no charge, but only in the following circumstances: If on your own behalf or on behalf of a third party you incorporate the PROGRAM into a web site, game, software application, program or any component thereof (collectively, "Work Product"), which in the case of a web site, must be accessible to internet users without payment of a fee of any kind, and in the case of a software application, game, program or component, neither you nor anyone to whom you distribute the Work Product charges a user a fee of any kind to use such Work Product or application, game, program or component into which such Work Product is embedded. The foregoing shall apply regardless of whether you are paid to create such Work Product.

B. In the event your intended use of the PROGRAM does not meet the criteria for the "no charge" license rights set forth in the immediately preceding paragraph, then you are not licensed to use the PROGRAM under this Agreement and must license the PROGRAM under GREENSOCK'S separate fee-based Software License Agreement which is granted to corporate Club GreenSock members (see http://www.greensock.com/club/ for details).

IV. TITLE AND OWNERSHIP
A. The PROGRAM is licensed, not sold, and is protected by copyright laws and international treaty provisions. You acknowledge that no title to the intellectual property in the PROGRAM is transferred to you. You further acknowledge that title and full ownership rights to the PROGRAM, including all intellectual property rights therein, will remain the exclusive property of GREENSOCK and you will not acquire any rights to the PROGRAM except as expressly set forth in this Agreement. You agree that any copies of the PROGRAM you make will contain the same proprietary notices which appear on and in the PROGRAM. You agree that GREENSOCK may identify you as a licensee unless you make a written request otherwise. GREENSOCK hereby grants to you the right to disclose that your product, game, software application, component, or other Work Product makes use of GREENSOCK code (for example, "Powered by TweenLite").

V. DISCLAIMER OF WARRANTY AND LIMITATION OF LIABILITY
A. THE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. GREENSOCK DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE PROGRAM WILL MEET YOUR REQUIREMENTS OR THAT OPERATION WILL BE UNINTERRUPTED OR ERROR FREE. GREENSOCK shall not be liable for special, indirect, incidental, or consequential damages with respect to any claim on account of or arising from this Agreement or use of the PROGRAM, even if GREENSOCK has been or is hereafter advised of the possibility of such damages. Because some states do not allow certain exclusions or limitations on implied warranties or of liability for consequential or incidental damages, the above exclusions may not apply to you. In no event, however, will GREENSOCK be liable to you, under any theory of recovery, in an amount in excess of $250. Notwithstanding anything else in this agreement, you agree to indemnify GREENSOCK, its assignees, and licensees, and hold each of them harmless from and against any and all claims, demands, losses, damages, liabilities, costs, and expenses, including legal fees arising out of or resulting from any negligent act or omission by you.

B. GREENSOCK may, at its sole discretion, provide support services related to the PROGRAM, but has no obligation to do so.

VI. TERMINATION
If you at any time fail to abide by the terms of this Agreement, GREENSOCK shall have the right to immediately terminate the license granted herein, require the return or destruction of all copies of the PROGRAM from you and certification in writing as to such return or destruction, and pursue any other legal or equitable remedies available.

VII. MISCELLANEOUS
A. This Agreement shall be construed in accordance with the laws of the State of Illinois. In the event of any dispute between you and GREENSOCK with respect to this Agreement, we both agree that if we cannot resolve the dispute in good faith discussion, either of us may submit the dispute for resolution to arbitration with the American Arbitration Association before a single arbitrator using the AAA Rules for Commercial Arbitration. The arbitrator's decision is final and can be enforced in any court with jurisdiction over such matters.

B. This agreement represents the complete and exclusive statement of the agreement between GREENSOCK and you and supersedes all prior agreements, proposals, representations and other communications, verbal or written, between them with respect to use of the program. This agreement may be modified only with the mutual written approval of authorized representatives of the parties.

C. The terms and conditions of this Agreement shall prevail notwithstanding any different, conflicting, or additional terms or conditions which may appear in any purchase order or other document submitted by you. You agree that such additional or inconsistent terms are deemed rejected by GREENSOCK.

D. GREENSOCK and you agree that any xerographically or electronically reproduced copy of this Agreement shall have the same legal force and effect as any copy bearing original signatures of the parties.

I'd like to learn how to get bonus plugins, update notifications, SVN access, and more.
To continue, you must agree to the following license:

TweenFilterLite (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 (22) RSS

Posted by Robert on May 30, 2007

Jack

many thanks for sharing your hard work. Having found the MC Tween class to be hugely timesaving and extremely useful I was looking for somthing that could product similar effects on color and brightness properties.

I’m sure it will become a key tool in future development

Regards

Robert

Posted by Bryan Bartow on June 2, 2007

Jack, thanks for creating this handy class. I can already tell that it will save me a fair amount of time. I’ll be sure to let you know if I publish anything that uses the class.

Posted by Zsotl Popa on June 14, 2007

Hello Jack, i just want to say a “thank you” here too, because i’m really amazed about your work and your helpfull mentality, love your tween, its a big help to me.

regards
Zsolt

Posted by Sean on August 30, 2007

For those of you who want to use this class in Flex … ITS EASY.
Flex does not allow you to add to the Application stage a MovieClip and this class uses a MovieClip for all of its methods ….

Solution:

Simply subclass any class you want ( for example ) and than continue by implementing two public methods in this class as follows:

public function set quality(i:int):void {}

public function get quality():int {
return 1;
}

That’s it …

Now use your class instead of MC.

Enjoy.

Sean – HeliHobby.com

Posted by blogk on November 26, 2007

great class and all, it’s the best in terms of filesize and simplicity, BUT:

sometimes (and it really is _essentially_ random) it throws an error

TypeError: Error #1010: A term is undefined and has no properties.
at gs::TweenFilterLite/render()
at gs::TweenLite$/executeAll()

when trying to tween blur filter. it stops execution of the tween and usually occurs when tweening blur filter of more than 40 instances at once.

and this has been a real pain in the ass!!

Posted by jack on November 26, 2007

blogk, after many hours of banging my head against the screen and trying to chase down the rare (and apparently completely random) 1010 error that TweenFilterLite throws from time to time in specific scenarios, I think I’ve figured it out. Actually, I’m almost positive it was caused by a bug in Flash but I whipped together a workaround and implemented it in version 5.5 of the class.

Thanks for the feedback.

Posted by Felixz on December 23, 2007

I have a problem using TweenFilterLite with textFields…
TweenFilterLite.to(someTextField,2,{type:”glow”,color:0x0000FF,blurX:20,blurY:10,strength:100});
I constantly get:
ArgumentError: Error #2008: Parameter type must be one of the accepted values.
at flash.text::TextField/set type()
at gs::TweenFilterLite/render()
at gs::TweenLite$/executeAll()

Posted by jack on December 26, 2007

Felixz, great catch. As of version 5.84, the error is fixed and you can now tween filters on TextFields.

Posted by Tony on March 7, 2008

Another quickie, Jack:
Could you post a quick tut on sound tweening of loaded mp3s (with other tweens running as well)? I’ve messed around with both the loaded sound as well as a SoundChannel, but a desired volume tween doesn’t seem to work. Or is this only possible with the newest version?

Thanks again.

– Tony

Posted by jack on March 7, 2008

Tony, tweening audio volume can be done two ways:

1) On a MovieClip that contains audio. This is as simple as:
TweenLite.to(myMovieClip, 2, {volume:0});

2) On a SoundChannel object.This is likely what you’d do with the MP3s you loaded in. When you play() your audio, it returns a SoundChannel object, so once you’ve loaded your MP3, it should be as easy as:

var myChannel = mySound.play();
TweenLite.to(myChannel, 2, {volume:0});

Keep in mind, you’re NOT tweening the Sound object – you’re tweening the SoundChannel object.

Posted by John on March 10, 2008

How can I set it to loop and change colors ramdonly or using an aray of colors?

Awesome work.

Posted by jack on March 11, 2008

John, you could accomplish what you’re after with something like:

var myColors:Array = [0xFF0000, 0x00FF00, 0x0000FF];
function tweenColor():void {
var randomColor = myColors[Math.floor(Math.random() * myColors.length)];
TweenFilterLite.to(my_mc, 2, {colorMatrixFilter:{colorize:randomColor, amount:2}, onComplete:tweenColor});
}
tweenColor();

Posted by Biffer on March 11, 2008

Hi there i have added an additional class for those who wish to use Events. This is a seperate class – so just use this instead of TweenLite.

A data object is dispatched with the Event so you can still pass around onStartParams etc in the usual way but just pick them up from the event listener.

hope this is some good to you event loving types.

http://biffcom.com/resource/tweenLiteEventMod/TweenLiteEventModExample.zip

Thanks,

Biffer Rowley

Posted by Tony on March 13, 2008

John:
Or you could just randomize the “hue” color parameter which is handily a 0-360 scale in TweenFilterLite:

theHue = (Math.round(Math.random() * 360)) ;
TweenFilterLite.to(my_mc, 2, {colorMatrixFilter:{amount:1, hue:theHue}});

You can enhance the effect with the brightness parameter as well (-1 to 1 scale). Very cool result with sky images.
–Tony

Posted by Nicolas on April 3, 2008

How i can dublicate effect like flash bulb. It is simple in Tweener.
Tweener.addTween(_loader,{_color_rb:255, _color_gb:255, _color_bb:255, time:1, transition:”easeOutQuad”});

I try use brightness with param 3 but result is poor for me.

Posted by jack on April 3, 2008

Nicolas, you can definitely create the effect you’re looking for using the ColorTransformProxy utility class I created for use in conjunction with TweenLite for tweening all the various ColorTransform-related properties, including redOffset, greenOffset, blueOffset, redMultiplier, greenMultiplier, blueMultiplier, tint, and even tintPercent and brightness!. Sign up for Club GreenSock and you’ll get that class as a bonus (as well as a TrasnformMatrixProxy class). See http://blog.greensock.com/club/ for details.

Posted by Lauren on April 20, 2008

Thanks for providing this! Fantastic tool.

Posted by Erich on May 8, 2008

Jack, thanks for creating these great classes. You’ve saved me hours of time. If you’re ever in Chicago, I owe you a beer.

Posted by brroy on May 12, 2008

I’ve been looking for a solid animation package to accompany AS3 projects and I think I’ve finally found it. Kudos on your work!

helipross.com

Posted by Cardigan on May 19, 2008

Thanks very much for this tool. Is it possible to remove a filter applied with tweenFilterLite?

Posted by jack on May 19, 2008

Cardigan, there isn’t currently a built-in way to automatically kill a filter after tweening it, but I may add that feature in a future version. Right now, though, you can just use an onComplete function to kill your filter(s). To remove all filters from a DisplayObject, just set its filters property to an empty Array in your custom onComplete function, like:

my_mc.filters = [];

Or to kill a specific kind of filter, you could set up an onComplete function like:

function removeFilterType($object:DisplayObject, $filterType:BitmapFilter):void {
var f:Array = $object.filters;
var a:Array = []; //remaining filters
for (var i:int = f.length – 1; i > -1; i–) {
if (!(f[i] is $filterType)) {
a.push(f[i]);
}
}
$object.filters = a;
}

and then in your tween, you’d do something like:

TweenFilterLite.to(my_mc, 1, {blurFilter:{blurX:20}, onComplete:removeFilterType, onCompleteParams:[my_mc, BlurFilter]});

(don’t forget to import the flash.filters.BlurFilter class)

Posted by Jay on September 25, 2008

Thank you so much for sharing that, you are truly a hero of the flash dev world… I feel a donation will be imminent…