Jump to content
GreenSock

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

Show Start Position on paused Timeline

Recommended Posts

Hello,

 

i defined a start position for my tweens. How can i show this position on Site Load - with a paused Timeline(The same Position as if i would click the reset Button after i played the Timeline in my Codepen Demo).

 

How can i do that?

See the Pen QygrbP by urtopal (@urtopal) on CodePen

Link to comment
Share on other sites

Hi urtopal  :)

 

pls use .fromTo() tween instead of .set() + .to() : http://greensock.com/docs/#/HTML5/GSAP/TweenMax/fromTo/

.fromTo(".red", 2,{x:200},{x:500})

and use .set() method instead of .to() with duration of '0' to setting value : http://greensock.com/docs/#/HTML5/GSAP/TweenMax/set/

var myTimeline = new TimelineMax();
 myTimeline
  .set(".red",{x:200})
  .to(".red", 2,{x:500})
  .pause(0);

pls check this out : 

See the Pen GoEdNB by MAW (@MAW) on CodePen

Link to comment
Share on other sites

thank you

 

myTimeline.pause(0); 

 

helped me.

In my Case i could not use "fromTo" or "set" i needed to set all with "to". Because my Startpoints/tweens could be declared at any Point (the Position comes only from Position Time)

 

For everybody who runs also in this Issue, dont forget to check if:  immediateRender=true in tween Settings

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