Jump to content
GreenSock

Jonathan

Console is outputing an error on 1.11.5 TweenMax.min.js CDN or am I crazy.

Recommended Posts

Hello..

 

Is anyone else seeing this error in the console.. when trying to declare a new instance of TimelineMax() from the Tweenmax 1.11.5 CDN??

 

I see this happening, just for a simple tween test:

See the Pen eankc by jonathan (@jonathan) on CodePen

 

I get the following error in codepen and even locally for some reason:

TypeError: this is undefined
https://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.5/TweenMax.min.js
Line 16

Thanks in advance to any who reply back :)

 

**UPDATE**

 

Its so weird..  now like 1 hour later and i don't see the error anymore, but the animation runs now... so weird !

 

I guess something was going on with the CDN... i guess whatever it was, its working again.. codepen might have been the issue too .. sorry  :D

Link to comment
Share on other sites

Hey Jonathan,

 

You're not crazy ;)

 

You're missing the new in the timeline variable, that's all. Timelines has to be instantiated in a "condensed" kind of way, while Tween instances support the "literal" way:

var tl = new TimelineMax({repeat:-1});

Rodrigo.

  • Like 1
Link to comment
Share on other sites

Thanks and Sorry Rodrigo.. Thats really strange!  

 

I was editing the pen after i posted this Topic, to add the box to() tween. .. but that's weird because I had the  new  for new TimelineMax() in there and tried rewriting the js code because codepen was freezing up on me and would not save.. giving me that server is busy and to try saving later message  .. but like an hour ago i was getting the error even with the new TimelineMax()..  But C'est la vie ...

 

So Thanks for checking Rodrigo.. Sorry for wasting everybody's time. :(

 

But im probably still a little crazy :D

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