Jump to content
GreenSock

rosmediapp

Confusion about TweenMax.fromTo

Recommended Posts

Let's say I have animation like this:

 

timeline

.add(TweenMax.fromTo(this, 3.5, {frameLabel: "anim_leave_screen"}, {frameLabel: "anim_leave_screen_end", ease: Linear.easeNone}))

.add(TweenMax.fromTo(this, 3.5, {frameLabel: "anim_enter_screen"}, {frameLabel: "anim_enter_screen_end", ease: Linear.easeNone}));

 

I think it's pretty straight-forward. It should work in my opinion like this:

1) [time 0.0] jump to frame with label "anim_leave_screen",

2) [time 0.0] play to frame with label "anim_leave_screen_end" for 3.5 seconds,

3) [time 3.5] jump to frame with label "anim_enter_screen",

4) [time 3.5] play to frame with label "anim_enter_screen_end" for 3.5 seconds.

 

But second tween immediately after adding jumps to frame "anim_enter_screen". I know there are other way to get this around (4x TweenMax.to), but shouldn't it working as I think? Also as far as I remember TweenMax.set works the same "bad" way.

Link to comment
Share on other sites

Please try adding immediateRender:false to your second tween

 

.add(TweenMax.fromTo(this, 3.5, {frameLabel: "anim_enter_screen"}, {frameLabel: "anim_enter_screen_end", ease: Linear.easeNone, immediateRender:false}));

 

Also, what version of GSAP are you using?

add

trace(TweenLite.version)

to find out. I'm curious if you are using an older version.

Link to comment
Share on other sites

My version is: 12.1.5 (latest?)

And.. it's working with immediateRender :)

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