mandag den 28. september 2009

Count to 9

//count to 9 loop.
//ngambles on 07/18/2009, 9:39 am Videocopilot.net

You can use the modulus operator (%). It divides the two values and returns the remainder.

Math.floor( time ) % 9

-----------------------------------------------------------------------------------

This will count from zero to eight, resulting in 9 unique numbers that change every second. To get it to count from 1 to 9 just add 1.

Math.floor( time ) % 9 + 1

-----------------------------------------------------------------------------------

To make it change faster multiply time by some number greater than 1.
The code you want is...

Math.floor( time ) % 10
AE POSTWORK blog is virtually just a notepad, where I put all the AE expressions up I finde and use, its so I can easily get to them wherever I am and no matter what computer I sit at. I do not write my own expressions, so all expressions on the page is downloaded from the web,or modify versions i found. and tutorials etc.. I will try to credit those who have made expressions if I can.

Now, with tips and tricks for AE & C4D.
No more forgetting the little tricks and tips I found on my road with After Effects, etc.

Sebabba