Jump to content

Matija Milikic

using javascript "call" on onComplete

Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi is there a way I can use "call" on onComplete ?

I tried something like this but it didn't work.

TweenMax.to(element,1,{x:100,onComplete: myFun.call,onCompleteParams:[something,"word"]})
Link to comment
Share on other sites

It's already doing that. Set the scope to whatever you're trying to call.

  onComplete: myFun,
  callbackScope: myScope
  • Like 4
Link to comment
Share on other sites

Why do you need to add a .call()? You can define a onCompleteScope property, wouldn't that work in your case?





Ah, sorry Blake, it is hard to see if someone's answering the thread when on a mobile phone.

Edited by Dipscom
Not in a mobile anymore
  • Like 3
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.