Jump to content
Search Community

Max works - Lite doesn't [SOLVED]

prototype test
Moderator Tag

Recommended Posts

I'm trying to do a simple alpha fade for a banner ad. It works when I use TweenMax but nothing when I use TweenLite (no errors thrown). I must be overlooking something. com folder (AS3) is in Flash root folder. Flash export v9 and AS3.

 

import com.greensock.*;
import com.greensock.easing.*;

this.save_mc.alpha = 0;
TweenLite.to(this.save_mc, 0.25, {alpha:1, ease:Quad.easeOut});
TweenLite.to(this.save_mc, 0.25, {alpha:0, ease:Quad.easeOut, delay:2});

 

If I change Lite to Max it works but adds about 13kb to file size.

Link to comment
Share on other sites

It's because of the default overwrite mode. See http://www.greensock.com/overwritemanager/

 

TweenMax inits OverwriteManager in AUTO mode by default, but TweenLite simply overwrites all existing tweens of the same object. You can get the same behavior as in TweenMax simply by doing this:

 

OverwriteManager.init(2); 

 

You only need to do that once in your swf.

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...