Jump to content
Search Community

Recent update to 12.1 broke tweenMax.updateTo

as3lover test
Moderator Tag

Recommended Posts

After updating from 12.0.16 to 12.1.1 (including 12.1) - updateTo no longer works..

 

First call for the tween uses this (which still works):

tweenMap = new TweenMax(grid, 0.001, { tx: newX, ty: newY, onComplete: grid.donePanning, ease: Quad.easeInOut });

repeated calls (dragging) then use this (which no longer works):

tweenMap.updateTo({ tx: newX, ty: newY, onComplete: grid.donePanning, ease: Quad.easeInOut });

Reverting back to 12.0.16 everything works ok.

 

Looking at the change diff - there are a number of updates in 12.1.  Any idea what might be the underlying issue?

 

Link to comment
Share on other sites

I'm really curious to see the different behavior that you're describing - can you post a very simple FLA that demonstrates the issue? That way, we can compile on our end and see exactly what's going on under the hood. It's tough to troubleshoot blind. 

 

(click the "more reply options" button below to get to a screen where you can attach a file, and please make sure you zip the file first). 

Link to comment
Share on other sites

 
Absolutely understandable - posting a FLA is unfortunately not possible - however, after profiling with Scout this is a typical sequence when using 12.0.16      
TweenMax.updateTo (com.greensock) 0 0% 1 4%
 TweenLite._init (com.greensock) 0 0% 1 4%
   TweenLite._initProps (com.greensock) 0 0% 1 4%
     TweenLite._applyOverwrite <static> (com.greensock) 1 4% 1 4%


Animation._updateRoot <static> (com.greensock.core) 0 0% 1 4%
  SimpleTimeline.render (com.greensock.core) 0 0% 1 4%
    TweenMax.render (com.greensock) 0 0% 1 4%
      TweenLite._init (com.greensock) 0 0% 1 4%
        TweenLite._initProps (com.greensock) 1 4% 1 4%

When profiling with 12.1.1 the sequence steps that never appear are: 

Animation._updateRoot <static> (com.greensock.core) 
  SimpleTimeline.render (com.greensock.core)

Let me know if this helps or what else I can provide in lieu of source.

 

Many Thanks,

Link to comment
Share on other sites

Hm, unfortunately that doesn't help much. You can't just whip together a super simple FLA with one tween in it to demonstrate the issue? We don't need to see your production source - just something bare-bones that reproduces the issue. 

 

I don't think anything changed in what calls the main _updateRoot() in v12.1.1 and nobody else has reported anything similar, so I'm really curious to see an example and identify what's different about your setup that may be causing the behavior. 

Link to comment
Share on other sites

The application is too complex for me to pull relevant pieces out and whip something together - well certainly not in an hour or less..

 

I have however, traced (somewhat) the issue to the render method in TweenMax.  By replacing the method with the method from 12.0.16 all is working again as expected.

 

I doubt I'm the only one who will run into the issue - although you never know! - so hopefully this can help.

Link to comment
Share on other sites

Bummer - it'd be so helpful to be able to see this. Well, would you be willing to look at the changelog and try figuring out which line/change was causing the issue? https://github.com/greensock/GreenSock-AS3/commit/54e31583ee8659297fd8127112793c6b19df99c9

 

Maybe revert them one at a time? (although some of them you can't really do one at a time because they depend on each other, but I'm sure you catch my drift). 

 

Thanks for getting back to us. 

Link to comment
Share on other sites

Your libraries have seriously added value to my project, so I'm happy to give back.

 

Ok, considering everything came to a stop, I started with any changes around return.. and voila!

 

Line 971 - when the new condition (|| _gc) is removed, everything works.

Link to comment
Share on other sites

I guess somehow, the tween is being disabled.  If I place this:

tweenMap._enabled(true);

immediately above this:

tweenMap.updateTo({ tx: newX, ...

then the new condition does not need to be removed from your render() method and everything works OK.

 

I'm not explicitly disabling the tween or killing it between the time I'm instantiating and the time I'm calling updateTo - so I'm pretty sure this is not a bug on my side..

Link to comment
Share on other sites

I suspect your tween had completed already when you called updateTo() (when a tween completes, it is automatically marked as eligible for gc unless it is inside a TimelineLite/Max that's still active). I added some code to the updateTo() method that will handle that situation (re-activate the tween). Does this work well for you? (see attached)

TweenMax_12.1.2_preview.zip

Link to comment
Share on other sites

Interesting. Can you tell me if the tween has already completed when you call updateTo()? Has it even started yet? Any more details about the state of the tween would be helpful so that I can try to create a reduced test case (no luck so far). 

The onComplete() method was not being called and yes the tween had started,,

Link to comment
Share on other sites

  • 5 months later...

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