ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Scale horizontal position but not scale? (Timeline)

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ocean Byrne
Scale horizontal position but not scale? (Timeline)
on Jul 3, 2019 at 7:36:43 pm

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...

Thanks!

Humble Pixel Farmer


Return to posts index

Tomas Bumbulevičius
Re: Scale horizontal position but not scale? (Timeline)
on Jul 4, 2019 at 9:17:56 am

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[0] + 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.

Let us know if this helps. Cheers.

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]