Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
jesper.landberg

set progress of tween without calling callbacks/events?

Recommended Posts

So If I have a timeline like this random example:
 

const tl = new TimelineMax()

tl
.from(el, 1, {
  yPercent: 100
})
.addCallback(someFunction, 0.5)
.to(el, 1, {
  xPercent: 100
})


But need to change the progress initially like:
 

tl.progress(1).progress(0)


How would u do this without calling the callback?

I tried removing it from the timeline, and add it like below, but doesn't seem to work as I want?
 

const tl = new TimelineMax({ paused: true )

tl
.from(el, 1, {
  yPercent: 100
})
.to(el, 1, {
  xPercent: 100
})

tl
.progress(1)
.progress(0)
.addCallback(someFunction, 0.5)
.play()

 

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