Continued Learning – The Countdown

I was not a fan of school when I was a kid or a young adult.  Don’t know if it was just not enough of a challenge, but even college could not hold my attention.  It was only a matter of time before learning became a passion of mine.  One of the biggest reasons we made the move to Sugar Land was the opportunity to continue learning.  I’m convinced the continued pursuit is an important part of a fulfilling adulthood.  The ironic thing is that I’m so busy these days I have to make time.  I just got After Effect recently and I thought that it was time for me to check it out.

We have just started using countdowns to start all of our services.  I have always thought of them as being just for the attendees, but I was mistaken.  After using one for the Easter services we realized that it solved most of the issues we had with getting the services started in a timely manner.  Well, that lead to my first After Effect project, a countdown.  With a little bit of research and time I have built my first countdown…(sorry for the big download)

The graphics above match our current sermon series and I thought it would be good to have a countdown that matched.  In starting the project, I went to my usual starting point, Google.  Found some good tips on using the numbers effects and the time code functions which I guess is the recommended way.  Then I saw a little snippet of an expression and being a programmer that can recognize javascript when I see it, I knew I was heading in the right direction.  With one little piece of code I had the countdown working, then I just needed to add the graphics.  Here is the code for the countdown text layer:


// Countdown time in seconds
countdownTime = 300;

// Get the seconds remaining
seconds = linear(Math.floor(time) , 0, countdownTime, 300, 0 );

// Get the minutes
minutes = Math.floor(seconds / 60)
// Calculate the seconds
secondsRemaining = Math.floor(seconds % 60);

// Add a zero if it the number is a single digit
if(secondsRemaining < 10)
{
secondsRemaining = "0" + secondsRemaining;
}

// Return the code formated time remaining
minutes + ":" + secondsRemaining

Here are the easy steps to using the above code:

  1. Create a composition with a length 1 second longer than the countdown timer.
  2. Add a text layer and expose its properties.
  3. For the sourceText properity option or alt click on the stopwatch and enter the code above.
  4. Set the countdownSeconds to the number of seconds you want in the countdown.

That is it, the rest is just standard After Effects stuff.  This was a fun project to start with and I look forward to doing more with motion graphics.

1 thought on “Continued Learning – The Countdown

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.