-
Notifications
You must be signed in to change notification settings - Fork 966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"TWEEN is undefined" #64
Comments
Where are you finding a reference to an object named "TWEEN"? Is it in the docs or examples somewhere?
|
I did notice in the docs that you always used createjs. I am going off of the blog post "Advanced animation path" and other blog posts like it. I did try createjs, though, and it got me past the object reference, but then I get "undefined is not a function" on every method after ".to()". I will remove one method, and the error simply moves to the next one down the list. |
It may have been an old blog post (more than 3 years). Have a look at the documentation and examples, and post questions to StackOverflow (this forum is for reporting issues). Cheers! |
I have looked through examples and documentation from this forum. I still end up with the error "undefined is not a function" on the methods I use, no matter what I use. |
Try starting with these demos: You can view and edit the code using the tab at the bottom right. |
Thanks! It turns out, I was getting this mixed up with another library called tweenjs that does use an object called TWEEN. I was using your CDN, (because I assumed your site belonged to the other tweenjs), and getting the methods all mixed up going back and forth between the two libraries' documentation. I was using their methods with your object. I can't believe I missed that they were two separate libraries for so long. The fact that the TWEEN object comes back as undefined even when I am referencing the right files means that I will probably try to work out how to do what I want with createjs before trying to figure out why TWEEN isn't working. It seems like this tween library is more complete as well. In the end, I'm glad I made the mistake. |
When I try to reference the TWEEN class in my code, I get an "Uncaught ReferenceError" saying that TWEEN is undefined. I have used the TweenJS CDN, the CreateJS CDN, the minified and the unminified file locally, and searched through countless examples to try and find out where I am going wrong. The line I get the error on is:
var tween = new TWEEN.Tween(location);
When I use the CreateJS CDN, the browser has no trouble with "new createjs...", but I just cannot get TweenJS to work.
The text was updated successfully, but these errors were encountered: