Countdown for DAYS


I need something, please can you help me, sorry for my english (french student ...)

In 2 weeks, my company will upload a file,

and I am doing an elearning module/communication module to introduce this file, explain what is it ...

my mentor ask me for a contdouwn for days

is it possible ?

I know we can use java to write the date ... on a slide, so storyline can read the date on my computer,

"var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var dateString=month + "/" + day + "/" + year
var player = GetPlayer();

I know  we can create a timer (count up/ count down)

but for days ?

"in 10 days" , then " in 9 days"  (10 days left ...)

thanks a lot


4 Replies
Michael Hinze

A while back, I had used a JavaScript to do a count down, see the opening screen of this project here (it's only displayed for a few sec.).

The script I used for a 'launch date' of June 12, 2014 was this:

"var minutes=1000*60;
var hours=minutes*60;
var days=hours*24;
var todaysDate = new Date();
var todaysCounter=todaysDate.getTime();
var todaysDay=Math.round(todaysCounter/days);
var beginCounter = Date.parse("June 12, 2014");
var BeginDay=Math.round(beginCounter/days);

var DaysLeftJS=BeginDay - todaysDay +1

var player = GetPlayer();

Hope that helps.

samir quarcia

It's just perfect !

thanks !!!

step 1 : create a variable , name "DaysLeft" , type "Text" , Value (blank)

step 2 : insert > TextBox > Write in the text box " %DaysLeft% "

step 3 : insert > New trigger > execute javascript when timeline start, and introduce your code

just a little mistake for me, there is 1 day more, I think it is because you wrote "todaysDay +1" , maybe not, i don't try to delete "+1"

but a simple solution was to write a wrong date in this part " Date.parse("June 12, 2014"); "

thanks again