ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Create a counter for stills

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adriano Moraes
Create a counter for stills
on Sep 14, 2009 at 10:52:16 pm

Hi there!

I need to add a simple counter over a slideshow so I can send it to my client and they can reorder things or make changes without driving me completly nuts.

There are 104 stills all with the same duration (10 secs each). The last pic enters at 1139 secs.(the comp has 1149secs)

I visited Dan Ebbert´s site and after playing with numbers I came up with this and applyed to the Source of a text layer:

//start code


numDecimals = 0;
beginCount = 1;
endCount = 104;
dur = 1139;

t = time - inPoint;
s = linear (t, 0, dur, beginCount, endCount).toFixed(numDecimals);



//end code

It kind of works but it´s not actually counting right. The numbers come up too late. i.e. #2 is displayed only after pic#2 is up for a while. (and it gets in later and later as it progresses.)

I´m still trying here but I wonder if someone would give me a hand.

Hope I made myself clear enough. I allready looked around the forum for old posts. Most helped but I couldn't find the real one answer.

Ok enough of that. Off to work .

Thanx in advance.

Cheers.

adriano moraes


Return to posts index

Dan Ebberts
Re: Create a counter for stills
on Sep 14, 2009 at 11:23:23 pm

Your math seems a little suspicious (104 layers in 1149 sec is 11.048 per), but in any case, if they're all the same duration, something like this should work:

stillDuration = 10;
Math.floor(time/stillDuration) + 1;


Dan



Return to posts index

Adriano Moraes
Re: Create a counter for stills
on Sep 14, 2009 at 11:31:57 pm

Thank you very much Dan!

Not only you solved my problem but you actually opened my eyes. It was not suspicious it was all wrong!!! I forgot about the extra seconds I added so the fades would not take time from the pics. And I´m using a rendered video so I could not see the overlays and conect the dots in my mind.

I got so much into solving the puzzle that I actually was putting it togheter with the pieces facing down.

Thanks for the fast response and the short new expression.

Cheers.


adriano moraes.


Return to posts index

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