Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Sander

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

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 post
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 post
Share on other sites

Glad you thought to download a more recent version - good instincts :)

 

Happy to help. Good luck on your project.

Link to post
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.

×