I want to do a horizontal timeline with ticks, year text, and flags with various images and maybe text.
I'm gonna want to start out zoomed in looking at just 1 or 2 years (filling my 1920x), and by the end scale it down to have 20ish years.
When I scale it down, I don't want my images, dates, or ticks to squash horizontally.
I was thinking to put everything in a Timeline precomp, and then have an expression on all the elements inside Timeline so when I scale Timeline's x to 50% each element scales it's x up to 200% - but I'm not quite sure the exact mathematical equation on that (other than with these nice big round numbers) nor do I know much about the syntax?
I'm open to better ideas on how to do this, especially one that doesn't require putting an expression on every element...
Hey, it depends on how you are going to make design. For example - the 'ticks'. Are they going to be individual shapes or something made with repeater?
With that in mind, disregarding on design choices - you need to link all design elements to expression, which controls gap space between years data.
Think about it like this. You create 1920 year, with all its items and pre-compose it. Then, you duplicate it and a new layer's X position is within this approach:
[previousLayerXPosition] + [sliderValue]
Which could be: thisComp.layer(index-1).transform.position + thisComp.layer("controls").effect("xGap-distance")(1)
Where 'xGap-distance' value - slider, in control layer which will affect gap's distance. With such approach, you can relate slider's gap value to a scale size. AND, that will give you X position reduce & increase, based on scale.