Jump to content
Search Community

Combined from/to is only allowed in TweenMax? [SOLVED]

Jakob Sternberg test
Moderator Tag

Recommended Posts

I normally startoff using TweenMax..but later if i find out i never really used TweenMax features (filters, and stuff)..then i switch to TweenLite.

This time i had hardtime seeing why the following code worked in TweenMax, but not in TweenLite. -- Until i realized that i was using from/to on same movieclip, i didnt knew that Lite/Max differered there..

 

import com.greensock.*;

TweenLite.from(mc,1,{_alpha:0})

TweenLite.to(mc,5,{_xscale:150})

 

/*

Above doesent work.. but with TweenMax it does

*/

 

Cheers

 

edit: is there a plugin that will activate Tweenlite to beeing able to do it?

Link to comment
Share on other sites

Nope, you don't need plugins for that - the problem simply has to do with overwriting. Remember, TweenMax automatically inits OverwriteManager in AUTO mode whereas TweenLite uses the ALL_IMMEDIATE mode internally. You have two tweens of the same object, so the 2nd one overwrites the first one even though none of the properties overlap. You can read up here: http://blog.greensock.com/overwritemanager/

 

All you need to do to fix it is add this line once at the beginning of your SWF:

OverwriteManager.init(2);

 

Vwalla!

 

And just so you know, TweenLite can do filter tweening now too - you just need to activate the appropriate plugin(s). See the Plugin Explorer for interactive examples and activation code. http://www.tweenlite.com

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...