# ScrubGSAPTimeline

## This script allows you to scrub through a GreenSock TimelineLite/Max timeline simply by moving your mouse left to right. It also displays your timeline's current time. It's particularly useful if you create long timelines and need to quickly and accurately preview certain points in your animation.

To use it:

- Get the JS script
  https://github.com/chrisgannon/ScrubGSAPTimeline
- In the JS panel, add the line `ScrubGSAPTimeline();` and pass in the TimelineLite/Max instance.
- So if your instance is called `umbrellaTimeline` you would write:
  `ScrubGSAPTimeline(umbrellaTimeline);`
- To let the timeline play automatically, move your mouse away from the document.
- Add multiple timelines as an array like this: `ScrubGSAPTimeline([umbrellaTimeline, fadeTimeline]);`
- Double click to pause/unpause

Get the file on GitHub here