effect>text>numbers (how to step the numbers over 9 frames)

Understand the code
Post Reply
sjj
Posts: 1
Joined: January 11th, 2012, 2:56 am

May 8th, 2013, 6:15 am

Hi,

I'm using the numbers effect to generate an avi for a list of numbers from 1 to 80, problem is i need each number to display for 9 frames? Could anyone explain how to do this with an expression and a brief explanation?

I'm using it as a texture in a 3d animation, i did one by hand but now my client wants to change the font!

Thanks in advance.

SJJ
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

May 8th, 2013, 11:45 am

You can do this with an expression on the Numbers effect's Value property or the Source Text property of a text layer.
time returns the current comp time in seconds, so time divided by the duration of one frame (in seconds) gives you the time in frames:

Code: Select all

time / thisComp.frameDuration;
you want each to last 9 frames so you could divide that by 9:

Code: Select all

(time / thisComp.frameDuration)/9;
but you also want the result of this to be rounded down to the nearest integer (whole number):

Code: Select all

Math.floor((thisComp.frameDuration)/9);
but as this starts from 0, you also need to add 1 to make it start from 1:

Code: Select all

Math.floor((time / thisComp.frameDuration)/9)+1;
Post Reply