Jump to content

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

Uncaught ReferenceError: tl not defined

Recommended Posts

Hi, so I'm currently trying to make the dashed trail rotate around the globe clockwise. However I keep getting an error saying that the tl, or "trail" has not been defined even though it looks like it is. Any help is greatly appreciated, thanks.

See the Pen VVMpMq by Marc1311 (@Marc1311) on CodePen

Link to comment
Share on other sites

It's telling you that tl is not defined because you have masterTl in your function.

//switch this
var masterTL = new TimelineMax();
tl.to(trail, 2, {alpha:1, rotation: 360});
return tl;

//to this
var tl = new TimelineMax();
tl.to(trail, 2, {alpha:1, rotation: 360, transformOrigin:"center center"});
return tl;


Make that change and you'll be good to go.


Happy tweening.


  • Like 5
  • Thanks 1
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.