Here is what I am using for this, results are very smooth:
Replace “Main Timeline” with the timeline you want to drive
Change the [time -=.02] and [time +=.02] to adjust scroll speed
Adjust the if [time < 12] bits to match the length of your timeline.
var time = hypeDocument.currentTimeInTimelineNamed('Main Timeline');
///// scroll timeline
function wheel(event) { // Firefox
event.preventDefault();
if (event.wheelDeltaY > 0 && time > .01) {
//console.log("up");
time -=.02;
hypeDocument.goToTimeInTimelineNamed(time, 'Main Timeline');
} else if (time < 12) {
//console.log("down");
time +=.02;
hypeDocument.goToTimeInTimelineNamed(time, 'Main Timeline');
}
}
function wheel2(event) { // other browsers
event.preventDefault();
if (event.detail < 0 && time > .01) {
//console.log("up");
time -=.02;
hypeDocument.goToTimeInTimelineNamed(time, 'Main Timeline');
} else if (time < 12) {
//console.log("down");
time +=.02;
hypeDocument.goToTimeInTimelineNamed(time, 'Main Timeline');
}
}
window.onmousewheel = document.onmousewheel = wheel;
window.addEventListener("DOMMouseScroll", wheel2, false);
document.addEventListener("DOMMouseScroll", wheel2, false);