Countdown Timer Script
26 posts • Page 1 of 2 • 1, 2
Countdown Timer Script
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
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
- Attachments
-
countdown_timer.zip- Changed the code to reflect the correct variable.
- (540 Bytes) Downloaded 13119 times
Last edited by chknstomper on 02/16/2009, 12:45 pm, edited 1 time in total.
- chknstomper
- Posts: 49
- Joined: 08/4/2008, 2:50 pm
- Location: St. Louis Missouri
Re: Countdown Timer Script
did not workd for me!! said there was an error on line 23 and that string was undefined!!
michelgreco - http://postprodkeyframes.ca
- michelgreco
- Posts: 14
- Joined: 08/1/2008, 7:25 pm
- Location: Montreal, Quebec, Canada
Re: Countdown Timer Script
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.
var myTextDocument = new TextDocument(string);
I'm using CS3.
- mjt57
- Posts: 570
- Joined: 08/14/2008, 9:13 am
- Location: Kansas City
Re: Countdown Timer Script
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.
var myTextDocument = new TextDocument(String);
to
var myTextDocument = new TextDocument(vString);
the only change is the v.
Let me know how it works.
- chknstomper
- Posts: 49
- Joined: 08/4/2008, 2:50 pm
- Location: St. Louis Missouri
Re: Countdown Timer Script
Working now. Thank you very much.
- mjt57
- Posts: 570
- Joined: 08/14/2008, 9:13 am
- Location: Kansas City
Re: Countdown Timer Script
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-
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-
- Behrens
- Posts: 1
- Joined: 02/16/2009, 9:10 pm
Re: Countdown Timer Script
Great job. I know a few people that make countdowns once a month that can use this.
This is to be a man of the highest type. To be and not seem; to do and not simply talk; to have the right ideal, the true motive and to patiently transform conduct in accordance with it.
- Bullboski
- Posts: 23
- Joined: 08/1/2008, 9:48 pm
- Location: Selma, NC
- Twitter: backwardsmanpro
Re: Countdown Timer Script
As the others say--great job!!! This is really a HUGE help...thanks for sharing with us all! 
Bryan
Bryan
- sweetPixel
- Posts: 1
- Joined: 10/16/2009, 6:48 am
Re: Countdown Timer Script
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
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
- mpcw
- Posts: 1
- Joined: 11/22/2009, 8:33 am
Re: Countdown Timer Script
Great job! This really has made my life easier. Keep up the great work.
Al
Al
- reboot
- Posts: 1
- Joined: 02/28/2010, 7:34 am
Re: Countdown Timer Script
this was a very big help, thanks for sharing this. 
- mdeo
- Posts: 3
- Joined: 09/10/2009, 1:45 am
Re: Countdown Timer Script
Thank you! This is wonderful!
- harrybonanza
- Posts: 1
- Joined: 03/8/2010, 1:41 pm
Re: Countdown Timer Script
just what I was looking for my Church 5min count down 
- xeneize480
- Posts: 1
- Joined: 03/26/2010, 12:46 am
Re: Countdown Timer Script
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?
Unable to execute script at line 24. Undefined is not an object.
Any clues on what to do to resolve this?
- futboljim7
- Posts: 10
- Joined: 04/13/2010, 10:17 am
Re: Countdown Timer Script
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!
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!
- futboljim7
- Posts: 10
- Joined: 04/13/2010, 10:17 am
Re: Countdown Timer Script
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!!
- aonekyle
- Posts: 1
- Joined: 05/10/2010, 11:22 am
Re: Countdown Timer Script
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?
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?
- codemonkey123
- VC Moderator

- Posts: 1876
- Joined: 08/5/2008, 12:57 am
Re: Countdown Timer Script
Amazing! Needed this... just in time!

- jpeytonspencer
- Posts: 109
- Joined: 08/2/2008, 8:25 pm
Re: Countdown Timer Script
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!!!
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!!!
- JESUAN
- Posts: 161
- Joined: 01/9/2011, 2:57 pm
Re: Countdown Timer Script
I do have a preset that does all the work for you: http://www.aenhancers.com/viewtopic.php?f=4&t=1553
- JorritSchulte
- Posts: 324
- Joined: 08/6/2008, 9:08 am
- Twitter: JorritSchulte
Re: Countdown Timer Script
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?
- philiplyons
- Posts: 26
- Joined: 08/27/2010, 3:53 pm
Re: Countdown Timer Script
- Code: Select all
timetoframes()
- illuminatus
- Posts: 133
- Joined: 02/22/2009, 11:30 am
Re: Countdown Timer Script
Thankyou for this script good sir, it is caring sharing people like you that make the internets a nicer place to be 
- easypreacher
- Posts: 2
- Joined: 10/4/2011, 8:28 pm
Re: Countdown Timer Script
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?
- 4Ministry
- Posts: 1
- Joined: 11/22/2011, 9:35 am
26 posts • Page 1 of 2 • 1, 2




