Automatic Copyright Update
Feb 26, 2018
By
Sean Swetz
We post a copyright notice at the bottom of every e-Learning (which we have hundreds, maybe even thousands of). As we start to convert everything from Captivate to Storyline, I have run into a small issue and hope it's an easy resolution. The copyright notice is in the slide master manually right now, is there a variable option I can put in the master to have it update based on the current year? This was very simple in Captivate. Is it possible in Storyline? Just a text box with a variable that adjusts based on the year in the system date?
Thank you for your help!
3 Replies
Try creating a variable called "Copyright" and insert it as a reference on your slide master. You should be able to add the following JavaScript code to make it update the year. Add a trigger to execute the JavaScript when the timeline starts. Your course copyright line should always show the current year.
Note: You can only see this work on the Storyline published file as JavaScript doesn't execute in the preview. You can also use any reference name you wish - just make sure the name matches in the last line of code.
Reference: %Copyyright%
JavaScript:
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var dateString=year
var player = GetPlayer();
player.SetVar("Copyright",dateString);
Thanks - I tried this and the JS worked perfectly!
Will the script work in the player? I want to place the copyright notice in top area, to avoid using the slide real estate, but it doesn't seem to populate the variable there. Is this possible?
This discussion is closed. You can start a new discussion or contact Articulate Support.