-
Slider Control Incrementing up Every Marker
Hello, I’m working on an expression that moves a Slider Control up by 40 every time the playhead passes a marker, it’s incrementing up every marker like I want but the linear I’m using doesn’t work, the slider goes up the full amount in 1 frame instead of over half a second like I would expect, what might be causing this?
var moveTime = .5; var moveAmount = 40; if (thisLayer.marker.nearestKey(time).time < time) { markerCount = thisLayer.marker.nearestKey(time).index + 1; } else markerCount = thisLayer.marker.nearestKey(time).index; //Returns the index of the marker ahead of the current time var moveStart = thisLayer.marker.key(markerCount).time; if (time = moveStart) { scroll = linear(time, moveStart, moveStart + moveTime,(markerCount-1)*moveAmount,markerCount*moveAmount); } scroll;