Jump to content

Search the Community

Showing results for tags 'default values'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Personal Website



Company Website



Found 2 results

  1. I am trying to add a defaults values for my fromTo(), I tried putting defaults: {} inside gsap.timeline({}) as below const tl_shapes = gsap.timeline( { defaults: { opacity: 0 } }, { defaults: { opacity: 1 } } ); function step_shapes_animation () { return tl_shapes .fromTo( ".step-2 .shapes img:first-child", { x: -200 }, { x: 0, duration: duration } ) .fromTo( ".step-2 .shapes img:last-child", { y: -200 }, { y: 0, duration: duration }, "-=0.4" ); } I am not sure if this is the right way to do it but second element doesn't seem to work and it starts with initial opacity: 1 and I guess it is because fromTo() has 2 objects and I can't put 2 objects for defaults. I am wondering if there is a right way to do it.
  2. Hello, I think I've got the wrong understanding of how the set function works when placed inside a timeline. In the codepen I've created a small animation that should set the box to start at left=0px and then start an animation at the 1 second mark to move the box from 200 to 500px. The actual behavior is that the box already starts at 200px. I can also press the seek(0.0) button and nothing happens. As soon as the animation once passes the start time of the fromTo tween, the seek to 0s will work. Could someone please explain why? I need to set a start value for the animation that will always work in the way that each call to seek with values < 1s will place the box at position 0px. How can I accomplish that? Best regards Alexander