Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
brendynz

What happened to OverwriteManager?

Recommended Posts

I redownloaded the AS3 classes, but OverwriteManagrer seems to have disappeared from the ZIP file, even though it is still extensively mentioned in the ASdocs. Does anyone know where it went - my code has been mangled because of it.

Link to comment
Share on other sites

Hi,

 

Sounds like you are trying to integrate GSAP version 12 with an older project.

 

From the v12 release notes:

 

OverwriteManager’s functionality is now baked into TweenLite, whose new default mode is “auto” (just like TweenMax). In 98% of the scenarios, this is what people preferred anyway. (Previously TweenLite’s default mode was “all” which killed all tweens of the same target immediately.) You no longer need to call OverwriteManager.init(). There is no OverwriteManager now. Overwrite modes are defined using Strings (although legacy code will still work with integers or booleans). An example of the new syntax is: TweenLite.to(mc, 1, {x:100, overwrite:"all"}); but again, “auto” mode is the new default. You can even change the default using the static .defaultOverwrite property.

 

Be sure to read the expanded 40 features here: http://www.greensock.com/v12/

Warnings about features that work differently than v11 are marked with a little caution icon.

 

There are only a few changes that should impact older projects. 

Let us know if you run into any other troubles.

  • Like 1
Link to comment
Share on other sites

Is there no static const to have auto complete remind me what's available anymore, or do I have to remember things like "all"? I found it was much better coding technique to use enums, such as OverwriteManager.ALL_IMMEDIATE.

Link to comment
Share on other sites

No, that'd just eat up more kb, but it should be really easy for you to just create a simple class with those constants if you like using them. 

Link to comment
Share on other sites

Understood for Tweenlite, but even with TweenMax, file size for 6 lines is a concern?

Link to comment
Share on other sites

Well, it's not just file size there - it's also the API, like when someone starts typing "TweenMax." and they get all the static methods like to(), from(), fromTo(), etc. I'm not sure it's beneficial to have a bunch of extra things in there, especially since most people don't use that sort of thing anymore (from what I've seen). I'm not saying your idea or coding style is bad at all - I totally understand how it can be useful to have constants to avoid typos. I'm just saying I don't think the benefits outweigh the costs for all the other users (you're the first person who has asked for this type of thing). If we get a lot of requests for it, we'll reconsider. But in the mean time, it should be super easy for you to create your own OverwriteManager class (or whatever) to implement those constants. That way it doesn't affect all the other users of GSAP too. 

Link to comment
Share on other sites

Fair enough. Appreciate the in-depth response. Thanks!

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.

×