Jump to content
Search Community

Keep getting error "Uncaught TypeError: Cannot read property '_time' of null"

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

 

I'm creating a project that uses TweenLite to tween easel properties. Everything goes right all the time, except for when I try to user TimelineMax.insert() to insert a tween (that doesn't tween any properties, but that I add to keep a reference to the object and to add the onUpdate-events the whole time the object should be on the easel Stage) at a certain point in my code.

 

At all the other points in my code where I use insert() to insert a tween at a certain position, everything goes right, but not at one point. I keep getting the error

Uncaught TypeError: Cannot read property '_time' of null

at line 564 of TimelineMax.js.. At this line this.timeline == null.

 

I've logged the other times I use insert() and this.timeline is never null. Also, I logged the object and it's properties, and they are also all not null or undefined.

 

I'm pretty stuck, do you have any idea?

 

Thanks!

 

(For reference, the insert code i use:)

this.timelineMax.insert(
TweenLite.to(
	object.easel,
	object.duration,
	{
	 }
 ),
 object.start
);

Link to comment
Share on other sites

Oh, sorry, I was planning on downloading the whole Greensock JavaScript Library again to check if the code at that point was maybe changed since I last updated the library, to check if it was maybe a bug that was already fixed, but I totally forgot!

 

Now I have, and I see, at line 564 of TweenMax.js, the code has changed: there is no longer a reference to this.timeline. I suspect that will solve all my problems.

 

Sorry for the unnecessary post and a big thanks for creating the whole library, you've really, really helped me out with my graduation project. :)

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