Advent calendar

Nov 15, 2019

Hi, we are thinking of doing an advent calendar.  Is there any mechanism we could use to make an item openable on a specific day (eg 1st December, 2nd December, etc)?

2 Replies
Debbie Thompson

I have created a Storyline example that does exactly this,  as Mathew says, the only extra bit I would add is to use month too, probably not so much of an issue now but was a few days ago.

 

The code I use for all my date stuff is below, it also pulls in year if need be, 

var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();

if(dd<10) {
dd='0'+dd
}

if(mm<10) {
mm='0'+mm
}

date= dd;
month= mm;
var player = GetPlayer();
player.SetVar("date",date);
player.SetVar("month",month);

Heres my example,

https://rethinkingdigitaleducation.co.uk/storyline-advent-calendar/

This discussion is closed. You can start a new discussion or contact Articulate Support.