Jump to content
Search Community

c.call is not a function

pimbvlo test
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

Hello! I'm a university student taking a Motion Graphics class.

 

Every time I play this animation, at around 7 or 8 seconds into the animation I'm getting an error stating: Uncaught TypeError: c.call is not a function. My professor suggested I post here. Hopefully it can get solved.

 

Thank you all.

Screen Shot 2018-11-28 at 2.39.58 PM.png

 

 

 

 

See the Pen MzPqmJ by pimbvlo (@pimbvlo) on CodePen

Link to comment
Share on other sites

Line 261 is the problem ... 

 

tl.staggerTo(gearArray, 0.5, {fill: "rgb(255,255,255)", scale: 1}, 0.25, "-=0.75", "GearGreyscale");

 

You're passing "GearGreyscale" as the onCompleteAll parameter but there is no function GearGreyscale()

 

That's not failing in the subsequent calls  ... example

 

tl.to([gearOne, gearTwo], 0.5, {alpha: 0.5}, "-=1", "GearGreyscale")

 

because .to() has no parameters after `position`.

 

Hope this helps!

  • Like 4
Link to comment
Share on other sites

Hi @pimbvlo 

 

Check out the docs for the .staggerTo() method.

https://greensock.com/docs/TimelineMax/staggerTo()

 

Your "GearGreyscale" label is in the onCompleteAll callback's position. You need to get rid of the "-=0.75" or the "GearGreyscale".

 

tl.staggerTo(gearArray, 0.5, {fill: "rgb(255,255,255)", scale: 1}, 0.25, "-=0.75", "GearGreyscale");

 

 

You can use the .add() method to add a label.

https://greensock.com/docs/TimelineMax/add

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