Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Thomas James Thorstensson

CDN TimelineLite : TimelineLite is undefined

Recommended Posts

Hello Fellow Greensockers,

 

Here is a question for you 

 

How come that, when trying to create an instance of TimelineLite after that the javascript onload event fired, the following import gives me this error in Chrome:Uncaught ReferenceError: TimelineLite is not defined(…)

 

 
<script type="text/javascript" src="https://s0.2mdn.net/ads/studio/cached_libs/cssplugin_1.19.0_cfbff7d208ccfdbe176b9855af1eb1fa_min.js">
    </script>
    
    <script type="text/javascript" src="https://s0.2mdn.net/ads/studio/cached_libs/tweenlite_1.19.0_422f021fad4c20f20cf3640a06ac39e9_min.js"></script>
 
Whereas this import does not
 
<script type="text/javascript" src="https://s0.2mdn.net/ads/studio/cached_libs/cssplugin_1.19.0_cfbff7d208ccfdbe176b9855af1eb1fa_min.js">
    </script>
    
    <script type="text/javascript" src="https://s0.2mdn.net/ads/studio/cached_libs/tweenmax_1.19.0_643d6911392a3398cb1607993edabfa7_min.js"></script>

Did my brain just die overnight ? Sorry, it is such a silly question. But as I recall I just need to import TweenLite to instantiate TimelineLite

 

 

Thanks in advance,

 

 

"S"

Link to comment
Share on other sites

TweenMax includes TweenLite, TimelineMax, TimelineLite and the CSSPlugin, so it would be fine on its own.

 <script type="text/javascript" src="https://s0.2mdn.net/ads/studio/cached_libs/tweenmax_1.19.0_643d6911392a3398cb1607993edabfa7_min.js"></script>

TweenLite is just TweenLite so you need the other scripts as well:

<script type="text/javascript" src="https://s0.2mdn.net/ads/studio/cached_libs/cssplugin_1.19.0_cfbff7d208ccfdbe176b9855af1eb1fa_min.js"></script>
<script type="text/javascript" src="https://s0.2mdn.net/ads/studio/cached_libs/timelinelite_1.19.0_13e3bd0e510d63fd5e5ef9bf9dac7017_min.js"></script>
<script type="text/javascript" src="https://s0.2mdn.net/ads/studio/cached_libs/tweenlite_1.19.0_422f021fad4c20f20cf3640a06ac39e9_min.js"></script>

  • Like 3
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.
×