ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Counter Control with Expressions

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jules Pontarius
Counter Control with Expressions
on Oct 4, 2012 at 7:54:33 pm

We've been trying to create a flip clock type counter in After Effects for a client video, and have gotten a single digit flip counter in working order, so that as you scrub down the timeline the numbers increment up.

However, we want it to be a three digit counter, and are having trouble thinking of an expression that would make the ten's place holder increment up by 1 only when the one's place holder transitions from 9 to 0.

Can anyone out there help?


Return to posts index

Jules Pontarius
Re: Counter Control with Expressions
on Oct 4, 2012 at 8:05:38 pm

Nevermind, on the ten's place precomp we applied a time offset variable and basically divided it by ten.


Return to posts index

John Cuevas
Re: Counter Control with Expressions
on Oct 4, 2012 at 8:10:30 pm

That's another good solution.

Johnny Cuevas, Editor
Thinkck.com

"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.


Return to posts index


John Cuevas
Re: Counter Control with Expressions
on Oct 4, 2012 at 8:10:00 pm

Here's an expression from After Effects Expressions that you might find useful:


var startingMinute = 9;
var startingSecond = 4;
var seconds = Math.floor(time) + startingSecond;
var minutes = Math.floor(seconds / 60) + startingMinute;
var secondsAsPartsOfAMinute = Math.floor(seconds % 60);
function addZeros(rawNumber)
{
if (rawNumber < 10) return "0" + rawNumber;
return "" + rawNumber;
}
addZeros(minutes) + ":" + addZeros(secondsAsPartsOfAMinute);


Johnny Cuevas, Editor
Thinkck.com

"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.


Return to posts index

Tudor "Ted" Jelescu
Re: Counter Control with Expressions
on Oct 6, 2012 at 3:59:20 pm

You could also pre-compose the first animation and then Time Remap the pre-comp accordingly.

Tudor "Ted" Jelescu
Senior VFX Artist


Return to posts index

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