ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Analog counter expression...

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Francois Germain
Analog counter expression...
on Jun 18, 2012 at 5:00:00 pm

Hi guys. I'm trying to make an analog counter like an odometer. Aharon Rabinowitz made a great poscast on that subject. But the way it's made, the decade number has an expression that it goes 1/10 the speed of the units number. The hundred number is 1/10 the speed of the decade number and so on.

What I'm looking for is an expression that make the decade number change between number 9 and 0 of the unit number. Each time the unit number switch from 9 to 0, the decade number increments of one.

I hope it's clear for you. English is not my first language.


Return to posts index

Francois Germain
Re: Analog counter expression...
on Jun 19, 2012 at 2:41:12 pm

Hey I've found it.

If you follow the odometer tutorial from Aharon Rabinowitz

there's the expression you put in the Offset effect (shift to center property)
Depending of the digit, you have to modify the start_value and the End_value. Hope someone will use it.

variableSlider =thisComp.layer("master compteur").effect("Slider Control")("Slider");// this line depends of your layer's name of course;

digit1 = Math.floor(variableSlider%10);
digit2 = Math.floor(variableSlider/10);
digit3 = Math.floor(variableSlider/100);
digit4 = Math.floor(variableSlider/1000);
digit5 = Math.floor(variableSlider/10000);
digit6 = Math.floor(variableSlider/100000);
digit7 = Math.floor(variableSlider/1000000);

offset=thisComp.layer("master compteur").effect("Slider Control")("Slider")%10;

Return to posts index

Liran Tabib
Re: Analog counter expression...
on Sep 11, 2018 at 12:43:16 pm
Last Edited By Liran Tabib on Sep 11, 2018 at 12:48:31 pm

You can create odometer animation with Analog Counter preset in the link below:


Liran Tabib

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved