Countdown Timer Script

Scripting for After Effects

Countdown Timer Script

Postby chknstomper on 02/10/2009, 8:07 am

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
Attachments
countdown_timer.zip
Changed the code to reflect the correct variable.
(540 Bytes) Downloaded 14741 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

Postby michelgreco on 02/16/2009, 7:55 am

did not workd for me!! said there was an error on line 23 and that string was undefined!!
michelgreco
 
Posts: 14
Joined: 08/1/2008, 7:25 pm
Location: Montreal, Quebec, Canada

Re: Countdown Timer Script

Postby mjt57 on 02/16/2009, 8:18 am

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.
mjt57
 
Posts: 576
Joined: 08/14/2008, 9:13 am
Location: Kansas City

Re: Countdown Timer Script

Postby chknstomper on 02/16/2009, 12:47 pm

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.
chknstomper
 
Posts: 49
Joined: 08/4/2008, 2:50 pm
Location: St. Louis Missouri

Re: Countdown Timer Script

Postby mjt57 on 02/16/2009, 2:44 pm

Working now. Thank you very much.
mjt57
 
Posts: 576
Joined: 08/14/2008, 9:13 am
Location: Kansas City

Re: Countdown Timer Script

Postby Behrens on 02/16/2009, 9:22 pm

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-
Behrens
 
Posts: 1
Joined: 02/16/2009, 9:10 pm

Re: Countdown Timer Script

Postby Bullboski on 02/16/2009, 9:59 pm

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

Postby sweetPixel on 10/16/2009, 6:53 am

As the others say--great job!!! This is really a HUGE help...thanks for sharing with us all! :)

Bryan
sweetPixel
 
Posts: 1
Joined: 10/16/2009, 6:48 am

Re: Countdown Timer Script

Postby mpcw on 11/22/2009, 8:43 am

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
mpcw
 
Posts: 1
Joined: 11/22/2009, 8:33 am

Re: Countdown Timer Script

Postby reboot on 02/28/2010, 7:39 am

Great job! This really has made my life easier. Keep up the great work.

Al
reboot
 
Posts: 1
Joined: 02/28/2010, 7:34 am

Re: Countdown Timer Script

Postby mdeo on 03/3/2010, 4:45 am

this was a very big help, thanks for sharing this. :ugeek:
mdeo
 
Posts: 3
Joined: 09/10/2009, 1:45 am

Re: Countdown Timer Script

Postby harrybonanza on 03/8/2010, 1:44 pm

Thank you! This is wonderful!
harrybonanza
 
Posts: 1
Joined: 03/8/2010, 1:41 pm

Re: Countdown Timer Script

Postby xeneize480 on 03/26/2010, 12:54 am

just what I was looking for my Church 5min count down :mrgreen:
xeneize480
 
Posts: 1
Joined: 03/26/2010, 12:46 am

Re: Countdown Timer Script

Postby futboljim7 on 04/22/2010, 9:38 am

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?
futboljim7
 
Posts: 10
Joined: 04/13/2010, 10:17 am

Re: Countdown Timer Script

Postby futboljim7 on 04/22/2010, 9:48 am

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!
futboljim7
 
Posts: 10
Joined: 04/13/2010, 10:17 am

Re: Countdown Timer Script

Postby aonekyle on 05/10/2010, 11:28 am

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

Postby codemonkey123 on 05/11/2010, 1:42 am

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?
codemonkey123
VC Moderator
VC Moderator
 
Posts: 1876
Joined: 08/5/2008, 12:57 am

Re: Countdown Timer Script

Postby heitorjimenez on 08/26/2010, 10:17 am

very nice tips
heitorjimenez
 
Posts: 1
Joined: 08/26/2010, 10:13 am

Re: Countdown Timer Script

Postby jpeytonspencer on 01/4/2011, 7:51 am

Amazing! Needed this... just in time!
:D
jpeytonspencer
 
Posts: 109
Joined: 08/2/2008, 8:25 pm

Re: Countdown Timer Script

Postby JESUAN on 01/15/2011, 8:19 am

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!!!
JESUAN
 
Posts: 168
Joined: 01/9/2011, 2:57 pm

Re: Countdown Timer Script

Postby JorritSchulte on 01/30/2011, 7:02 am

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

Postby philiplyons on 09/6/2011, 4:50 am

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

Postby illuminatus on 09/6/2011, 7:26 am

Code: Select all
timetoframes()
illuminatus
 
Posts: 140
Joined: 02/22/2009, 11:30 am

Re: Countdown Timer Script

Postby easypreacher on 11/17/2011, 10:45 am

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

Postby 4Ministry on 11/22/2011, 9:44 am

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

Next

Return to After Effects Expressions