Jump to content
Search Community

using javascript "call" on onComplete

Matija Milikic
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

Matija Milikic
Posted

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"]})
Posted

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

TweenMax.to(element,1,{
  x:100,
  onComplete: myFun,
  onCompleteParams:[something,"word"],
  callbackScope: myScope
})
  • Like 4
Posted (edited)

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

http://greensock.com/docs/#/HTML5/GSAP/TweenMax/

 

---

 

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
Matija Milikic
Posted

Thanks,I forgot about that

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.
×
×
  • Create New...