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:

Utilities for Code Hinting and Strict Typing in TweenLite/Filter/Max

  • Version: 4.0, Updated 10/21/2009
  • File size added to compressed SWF: about 13kb

These AS3 utility classes that can (optionally) be used with TweenLite or TweenMax that address two requests:

  1. Code hinting - Sometimes it's hard to remember all the special properties that are available in the tweening classes, so code hinting would be very useful. In most decent code editors like Flex Builder, FDT, etc. (NOT the Flash Authoring tool), these classes will trigger code hinting (see screen capture below).
  2. Strict data typing - Some developers are extremely passionate about strict data typing and they're scared away by TweenLite/Max's "loosey-goosey" treatment of the vars Object. Many others love the flexibility, efficiency, and readability of that same feature. This utility should make it easier on the strict data typing folks.

The utilities are included in the AS3 TweenMax download.

Documentation

Please see the full ASDoc documentation.

Example code

Basically, the idea is that you use a TweenLiteVars for the 3rd parameter in TweenLite.to() or TweenLite.from() calls. Here's a quick comparison:

WITHOUT UTILITY:

Actionscript:
  1. import com.greensock.TweenLite;
  2. import com.greensock.easing.*;
  3.  
  4. TweenLite.to(my_mc, 2, {x:300, y:"100", ease:Elastic.easeOut, onComplete:myFunction});

WITH UTILITY:

Actionscript:
  1. import com.greensock.TweenLite;
  2. import com.greensock.data.TweenLiteVars;
  3. import com.greensock.easing.*;
  4.  
  5. var v:TweenLiteVars = new TweenLiteVars();
  6. v.addProps("x", 300, false, "y", 100, true); //with addProps(), you can add up to 10 dynamic properties at a time. addProp() adds one at a time.
  7. v.ease = Elastic.easeOut;
  8. v.onComplete = myFunction;
  9.  
  10. TweenLite.to(my_mc, 2, v);

So there is a bit more code to write, but for some developers, the strict typing and code hinting may be well worth the tradeoff. I personally prefer the shorter, more flexible loose style, but several well-respected developers have said that strict data typing is an absolute must-have for them, and it's the only thing that keeps 'em away from TweenLite/Max. Well, now there are no excuses :)

FAQ

  1. Do I have to use this utility in order for TweenLite/Max to work?
    Absolutely not. It is completely optional.
  2. Does this utility only work with TweenLite? What about TweenMax?
    Don't fret - there is a TweenLiteVars class for use with TweenLite, a TweenMaxVars class for use with TweenMax. All are included in all of the AS3 tween downloads.
  3. Can I use the shorter (not strictly-typed) way to define dynamic variables but still use this class for its code hinting benefits?
    Sure, if you prefer, you can pass in variables to the constructor in the short-hand fashion, like so:

    Actionscript:
    1. var v:TweenLiteVars = new TweenLiteVars({x:300, y:"100", onComplete:myFunction, ease:Elastic.easeOut});

  4. What about filter tweens?
    As of version 0.95, there is a utility class for each type of filter (like BlurFilterVars, ColorMatrixFilterVars, etc.) which can be used like:

    Actionscript:
    1. import com.greensock.TweenMax;
    2. import com.greensock.data.*;
    3.  
    4. var myVars:TweenMaxVars = new TweenMaxVars();
    5. myVars.blurFilter = new BlurFilterVars(10, 10);
    6. myVars.colorMatrixFilter = new ColorMatrixFilterVars(0xFF0000);
    7. TweeenMax.to(my_mc, 2, myVars);

Comments (7) RSS

Posted by Gabriel Mariani on July 15, 2008

Looks useful, but kind of amusing that you had to build this out to begin with. I guess some people are that hard core about strict typing eh.

Posted by jack on July 15, 2008

Yeah, Gabriel. I hear you. But you might be surprised by how passionately some developers argue the merits of strict data typing. I’m all for it, actually. There are certainly up sides. But there are down sides too.For example, strict datatyping requires more code and (depending on how it’s implemented) can be far less readable. For example:

TweenLite.to(my_mc, 2, {x:300, y:100, scaleX:1.5, scaleY:2, rotation:90, onComplete:myFunction, ease:Elastic.easeOut});

Is much more readable than:

TweenLite.to(my_mc, 2, 300, 100, 1.5, 2, 90, myFunction, Elastic.easeOut);

And it’s less code that an alternate way of strictly data typing:

var myTween:TweenLite = new TweenLite();
myTween.target = my_mc;
myTween.duration = 2;
myTween.x = 300;
myTween.y = 100;
myTween.scaleX = 1.5;
myTween.scaleY = 2;
myTween.rotation = 90;
myTween.onComplete = myFunction;
myTween.ease = Elastic.easeOut;

But again, it’s just my personal opinion. I don’t think it’s a right vs. wrong issue, and I can see the benefits of using strict data typing when debugging very complex applications. Strict typing can also lead to better performance, but for TweenLite/Filter/Max, those speed benefits can’t be fully realized because they need to be able to tween ANY numeric property of ANY Object, dynamically.

Hopefully these utilities will serve the stricter types among us well. :)

Posted by Rich on July 16, 2008

This is excellent, thank you. I have implemented it immediately. While the vars version may have longer code I feel it’s more flexible as I can have conditional values without having to create temp vars to hold them, i.e.:

if (isGoingUp)
{
myTween.y = 0;
} else {
myTween.y = 300;
}

where-as before I would have to had either 2 complete TweenMax calls in there, or start creating a temp var for each value that may have been conditional.

So, not just for the strict freaks at all :)

Posted by mjamado on July 17, 2008

Good job (again)!

Although I’m all for strict typing, I have a question… In my experience, class instantiation always come with a performance hit. Have you re-tested Tween Family performance with this? Is there a penalty, or is it negligible?

On a side note, it’s amazing how some people just don’t use a package because it lacks strict typing… One might as well not use PHP, JavaScript… I’ve been working with strict typing since, well, forever (I come from desktop development, made the switch to Web Dev about a year ago), and even I’m not THAT freak…

Keep up!

Posted by jack on July 17, 2008

mjamado, yes, there is a slight performance hit when using the utility, but it’s negligible according to my tests. Even when doing 1500 every 0.5 seconds, it held up very well.

Posted by Ash on September 8, 2008

Good grief you have been busy!

nice work

Posted by Mikael on October 16, 2008

Yes this whole new package is amazing, a big steep forward and I have been waiting for the tweenmanager för AS3 since this spring. I have no problem paying for it. I know how long it takes to develop a application like that. sweet, nice work!