Jump to content
GreenSock

JimmiQR

Import OverwriteManager for static constants?

Recommended Posts

I saw an example on your site that uses static constants for OverwriteManager, such as OverwriteManager.PREEXISTING:

TweenMax.to(mc, 1, {x:100, overwrite:OverwriteManager.PREEXISTING});

But I can not get my editor to autocomplete or recognize that OverwriteManager Class. I dug through the imports available in greensock, but did not see it. I am on version 12. I would prefer to use the constants over numbers, as I think that is good practice, but I don't know how to go about getting this to recognize. FYI, I am using Flash Develop, in case the problem lies there.

Link to comment
Share on other sites

Yeah, there really isn't an overwrite manager in v12.

As per the release notes:

 

Top 10 Improvements

 

#6: 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.

 

http://www.greensock.com/v12/

Link to comment
Share on other sites

Oh thanks! I read through those changes a few months ago, but I didn't understand how much different it was. I guess I didn't have as much a use for it then, so I gleaned over it.  But this makes better sense now, and I will play with the new string params if I still think I need them.

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