Jump to content
Search Community

Uncaught TypeError: Cannot set property '_overwrite' of null

kk12837
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

Posted

I use tweenMax to do the animation, however, my page shows Uncaught TypeError: Cannot set property '_overwrite' of null in console.

 

anyone has seen this before?

 

Thanks

Posted

It's tough to say for sure without seeing your code, but my guess is that you're using the wrong syntax, like this:

 

//BAD:
TweenMax(...);

//GOOD:
TweenMax.to(...);

//ALSO GOOD:
new TweenMax(...);

Also, please make sure you've got the latest files (1.9.0 as of today). If you're still having trouble, can you post a very simple example that generates the error? Maybe a codepen or jsfiddle or a simple HTML doc? 

Posted

thanks for your reply,
I will show you my code

Posted

I'm not seeing any obvious errors - could you please post a very simple codepen or jsfiddle or attach an HTML doc here that clearly demonstrates the problem with as little code as possible? Typically the error you're getting has to do with bad syntax somewhere in your code. 

Posted

alright, I will try to post a simple sample

Posted

Can a tween overwrite by another tween?

 

like

 

TweenMax.fromTo($a, 1,{top: "10px"} {top:"1px", yoyo: true, repeat: -1}),

 

when i click a button,

 

TweenMax.to($a, 1, {top:"3px"}),

Posted

Sure, that's by design. The engine automatically protects you from running multiple tweens of the same object's properties simultaneously. Otherwise, they'd be battling for control of the same property. The one that starts last overwrites the previous one (only the individual properties that overlap). There are multiple overwrite modes you can choose from - "auto" is the default and it's by far the most common one that developers prefer. More overwrite modes are described in the docs. http://api.greensock.com/js/ (click on "TweenLite" or "TweenMax")

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