ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Countdown from AD to BC

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alokin SugarCountdown from AD to BC
by on May 7, 2015 at 2:59:23 pm

Hi everyone longtime reader of the forum first time poster.
As the title says im stuck on how to make a counter/slider combo to output a number with the letters AD on the left side of the number, when this number counts down past zero it shows a - sign and I'd like to hide or remove that and continue to count. Is it even possible to replace the AD with BC after it passes zero?

Return to posts index

Dave LaRondeRe: Countdown from AD to BC
by on May 8, 2015 at 4:11:35 pm

Are trying to make numbers in Hexidecimal? You may have to do it by hand.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA

Return to posts index

John CuevasRe: Countdown from AD to BC
by on May 8, 2015 at 5:27:34 pm

Sure, you would use a slider to create the numbers then input them into a text field using:

Math.round(Math.abs(thisComp.layer("Controls").effect("Slider Control")("Slider")))

Round just rounds the slider number and Math.abs uses just absolute value of the number, ignoring whether it's postive or negative.

For the AD/BC, you connect to the same slider and use an If/Else statement.

var date = ["AD","BC"]
myInput = thisComp.layer("Controls").effect("Slider Control")("Slider");

if (myInput > 0) date[0] else date[1]

Here's a simple project with it all worked out:

Johnny Cuevas, Editor

"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

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