FORUMS: list search recent posts

Timer expression shifting position with count

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dustin Parsons
Timer expression shifting position with count
on Dec 19, 2016 at 6:33:18 pm

I made a 2 min countdown timer but I'm having trouble with it's position moving as the numbers change. Is there any way to lock down the position so it doesn't move horizontally with every number change?

Can't figure out how to embed an animated gif so here it is:
http://giphy.com/gifs/l0HlIuzWDj86PYN0I

And here's the expression I'm using:
countspeed = -1;
clockStart = 120;

function times(n){
if (n < 10) return "0" + n else return "" + n
}

clockTime = clockStart +countspeed*(time - inPoint);

if (clockTime < 0){
minus = "-";
clockTime = -clockTime;
}else{
minus = "";
}

t = Math.floor(clockTime);
h = Math.floor(t/3600);
min = Math.floor((t%3600)/60);
sec = Math.floor(t%60);
ms = clockTime.toFixed(3).substr(-3);
minus + times(min) + ":" + times(sec)


Return to posts index

Walter Soyka
Re: Timer expression shifting position with count
on Dec 19, 2016 at 7:02:47 pm

Would it help if you set the text layer to left-justified instead of centered?

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Dustin Parsons
Re: Timer expression shifting position with count
on Dec 19, 2016 at 7:24:03 pm

That would help! Haha, can't believe I hadn't tried that. Thanks Walter


Return to posts index

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