-
Expression to count up every X amount of frames
Hi all!
I’m currently working on an animated data visualisation, and I’m having issues syncing up my animated timeline with my data points on the chart. The timeline looks like this:
The marker moves along the timeline from left to right, whilst the day marker to the right counts up.
In the expression for the data points, each day has a duration of 3 frames. So 0:00:00:00 = val1, 0:00:00:03 = val2, 0:00:00:06 = val3 etc.
I’ve used a slider control for the day marker (setting start and end values to 1 and 29/30/31 respectively), with this expression in Source Text:
Math.round(effect("Slider Control")("Slider"))However it doesn’t exactly sync up with the data – some days get 4 frames, some get 3 etc. Is it a rounding issue?
I think I need to create some kind of integer counter that counts up every 3 frames exactly – can anybody help?

