Forum Discussion
Setting an expiry date for published content
I think I found somethint that might work using Java Script
Create a trigger that runs this script when the first page timeline starts:
var currentDate = new Date()
var day = currentDate.getDate()
var month = currentDate.getMonth() + 1
var year = currentDate.getFullYear()
player.SetVar("day1", day);
player.SetVar("month1", month);
player.SetVar("year1", year);
This sets numeric variables in Storyline for day, month and year from your computer.
I created numeric varaibles, day1, month1, and year1 initially set to zero
Then I created a trigger that would show a layer when the timeline starts if:
day1 is greater than a specific number, in my example, 7
and
month1 is greater than or equal to a specific number, in my example, 2
and
year1 is greater than or equal to a specific number, in my example, 2013
That layer displays text that the content expired and has a close course button.
I disabled the next button and added a continue button on the first page. If the Expired layer is visible, I prevented users from clicking items on the base layer.
I included the variables on the first page for testing, but they need not display.
Here is the file, you must publish to test. To test the expiration, set your computer for a date in the future beyond your expiration date.
- ApoorvJain8 years agoCommunity Member
Hello, Garth Yorko, T.E.
I have created a module where I used a true/false variable. I also used a javascript code to set the expiry date of the module.
Now I want, if the value of my variable is true then show layer 1.
here I am sharing my .story file please have a look let me know.
- BlackGFX6 months agoCommunity Member
Thank You so much for the well executed file with the solution.