Jump to content
Search Community

Cannot create property '_gsTweenID' on number '570'

Ozzy 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

Hi, so I am trying to rebuild this canvas peace which has Gsap powered animation in it. https://codepen.io/fcordillot/pen/xRdEPx 

I tried to build my own code for this as you can see here 

 

But when I add TweenMax code to the if statement on the line "105"  I start getting errors. Can someone help?

You can see the TweenMax code commented above the if statement 

See the Pen WLWbKQ by lukagurovic (@lukagurovic) on CodePen

See the Pen xRdEPx by fcordillot (@fcordillot) on CodePen

See the Pen WLWbKQ by lukagurovic (@lukagurovic) on CodePen

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

thanks for the demo.

 

 

It seems you were setting this.x as the target of your tween

 

bad

TweenMax.to(this.x, 0.4, {scale: 2} )
TweenMax.to(this.y, 2, {scale: 2} )

 

good

TweenMax.to(this, 0.4, {x:400} )
TweenMax.to(this, 2, {y:400} )

 

obviously, you'll have to use the right values for x and y. Just wanted to show you how to get the tweens working.

 

See the Pen BvEZad?editors=0010 by GreenSock (@GreenSock) on CodePen

 

  • Like 4
  • Thanks 1
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...