Page 1 of 2

Countdown Timer Script

PostPosted: 02/10/2009, 8:07 am
by chknstomper
I am always looking for easier ways to do things around here. Since we have been making countdowns and timers in some of our video production I decided to write an After Effects script that would create the text layer and add the countdown expression to it. The script when run will pop up a window asking how many minutes you want the timer to count down. You will need to have a comp that is that many minutes long. Run the script and you are basically done. Here are the steps:

1. Download the script attached.

2. Copy the script to the scripts folder (in windows C:\program files\adobe\Adobe After Effects CS3\Support Files\Scripts)

3. Create a composition as long as you want the timer

4. Add an interesting background

5. Click on File > Scripts > countdown_timer.jsx

6. Render it out!



I hope this is useful for you guys!



Steven

Re: Countdown Timer Script

PostPosted: 02/16/2009, 7:55 am
by michelgreco
did not workd for me!! said there was an error on line 23 and that string was undefined!!

Re: Countdown Timer Script

PostPosted: 02/16/2009, 8:18 am
by mjt57
Thank you for creating this, but I'm getting the same error. I think the line is:

var myTextDocument = new TextDocument(string);

I'm using CS3.

Re: Countdown Timer Script

PostPosted: 02/16/2009, 12:47 pm
by chknstomper
Hey sorry for that! I posted a different version after i had changed the variables in one portion but not in another. You can download it again or simply change the line

var myTextDocument = new TextDocument(String);

to

var myTextDocument = new TextDocument(vString);

the only change is the v.

Let me know how it works.

Re: Countdown Timer Script

PostPosted: 02/16/2009, 2:44 pm
by mjt57
Working now. Thank you very much.

Re: Countdown Timer Script

PostPosted: 02/16/2009, 9:22 pm
by Behrens
Wow! This is just what I was looking for.

I, more than once, went to listen to this guy give a presentation, and he had a countdown timer displayed for the ten minutes before he started. I thought that it built anticipation. Also, it was real professional when he started on time.

I built my version tonight and it is rendering right now.

Thanks!

-Behrens-

Re: Countdown Timer Script

PostPosted: 02/16/2009, 9:59 pm
by Bullboski
Great job. I know a few people that make countdowns once a month that can use this.

Re: Countdown Timer Script

PostPosted: 10/16/2009, 6:53 am
by sweetPixel
As the others say--great job!!! This is really a HUGE help...thanks for sharing with us all! :)

Bryan

Re: Countdown Timer Script

PostPosted: 11/22/2009, 8:43 am
by mpcw
Hi,

thanks for that really cool and useful script. I am quite new to After Effects and don't have that much experience - especially regarding scripts. I wonder if there is an easy way to modify the provided script to enable the timer to show hundredths of a second.

Alex

Re: Countdown Timer Script

PostPosted: 02/28/2010, 7:39 am
by reboot
Great job! This really has made my life easier. Keep up the great work.

Al

Re: Countdown Timer Script

PostPosted: 03/3/2010, 4:45 am
by mdeo
this was a very big help, thanks for sharing this. :ugeek:

Re: Countdown Timer Script

PostPosted: 03/8/2010, 1:44 pm
by harrybonanza
Thank you! This is wonderful!

Re: Countdown Timer Script

PostPosted: 03/26/2010, 12:54 am
by xeneize480
just what I was looking for my Church 5min count down :mrgreen:

Re: Countdown Timer Script

PostPosted: 04/22/2010, 9:38 am
by futboljim7
I am running this on CS4 and I get the following error

Unable to execute script at line 24. Undefined is not an object.

Any clues on what to do to resolve this?

Re: Countdown Timer Script

PostPosted: 04/22/2010, 9:48 am
by futboljim7
Actually I solved the issue on the below line

vString = 'offset = 0; '
+ 'i = inPoint + offset; '
+ 'dur = ' + vMin + '; '
+ 'dur *= 60; '
+ 'seconds = Math.max(dur - Math.max((time - i), 0),0); '
+ 'minutes = Math.floor(seconds / 60); '
+ 'seconds = Math.floor(seconds - (minutes * 60)); '
+ "if(seconds < 10) seconds = '0' + seconds; "
+ "minutes + ':' + seconds "

There was no semi-colon at the end. I just added one and it works perfectly....thinking about it now I may have accidentally deleted it. So, sorry for the bother and thanks again for such a great script!

Re: Countdown Timer Script

PostPosted: 05/10/2010, 11:28 am
by aonekyle
Is there any way to add miliseconds to this script? I am making a countdown video for our Children's Church, and need miliseconds on the countdown if possible.... Thanks so much, and nice job on the script!!

Re: Countdown Timer Script

PostPosted: 05/11/2010, 1:42 am
by codemonkey123
Milliseconds?

Why not just add a random number that changes every frame as the time it takes to register will be about as accurate to the human eye?

Re: Countdown Timer Script

PostPosted: 08/26/2010, 10:17 am
by heitorjimenez
very nice tips

Re: Countdown Timer Script

PostPosted: 01/4/2011, 7:51 am
by jpeytonspencer
Amazing! Needed this... just in time!
:D

Re: Countdown Timer Script

PostPosted: 01/15/2011, 8:19 am
by JESUAN
wow amazing!!! right now i don't need it ...but i will keep it in gold!!!!

thnx a lot man...it worked for me from the first time...but a question....when it asks how many minutes?? if i want to load only 30 sec?? how can i do it? typing 0,5??

thnx mate!!!

Re: Countdown Timer Script

PostPosted: 01/30/2011, 7:02 am
by JorritSchulte
I do have a preset that does all the work for you: http://www.aenhancers.com/viewtopic.php?f=4&t=1553

Re: Countdown Timer Script

PostPosted: 09/6/2011, 4:50 am
by philiplyons
I would really like to be able to add frame numbers to the countdown. Even better if I had the choice of frame rates! Help anyone?

Re: Countdown Timer Script

PostPosted: 09/6/2011, 7:26 am
by illuminatus
Code: Select all
timetoframes()

Re: Countdown Timer Script

PostPosted: 11/17/2011, 10:45 am
by easypreacher
Thankyou for this script good sir, it is caring sharing people like you that make the internets a nicer place to be :)

Re: Countdown Timer Script

PostPosted: 11/22/2011, 9:44 am
by 4Ministry
I am working on a holiday rush countdown to show how many days left of shopping. Can you help me with a script that will show DAYS:HOURS:MINUTES:SECONDS instead of HOURS:MINUTES:SECONDS?