Display total project time using new elapsed time variables


Ive updated Storyline and love that there are new features with the elapsed project / slide / scene built in variables. 

I saw a few tutorials on how to do a few things, ie mark a course as complete when a certain time reached, or do something (ie show a layer) once a cetain time is reached. But there was a tutorial missing for one thing mentioned could be done. 

Is there a way to display the elapsed time in seconds or minutes? 

For example, an elearn has a duration of 30mins, and id love to display at the top the time spent so far as a count up or count down.

I tried inserting it like this... "Elapsed time: %Project.ElapsedTime% / 30mins" however the project elapsed time counts in milliseconds (in the thousands) whic is distracting. Is there a way i can use other variables or triggers to convert this counting so it displayed in seconds or minutes?

11 Replies
Phil Mayor

You can use some javascript something like this should work (sorry not tested):

var player = GetPlayer();
var minutes, seconds;
var timeM = player.GetVar("timeM");

function timer() {
minutes = zeros(Math.floor(timeM / 60));
seconds = zeros(timeM % 60);

totalTime = minutes + ':' + seconds;

Needs variables timeM that is set from inbuilt variable and time_Display that you show on your Timer. You would need to call each second for this to update in real time

Matt Pereira

Hi Phil,

I am planning to use the elapsed time to report back the time spent on each section. Is it possible to access the time spent in each scene from another scene? In my case, I want to total up the time spent in each section once the user completes the activity. So i need to be able to access each scenes total duration from the end slide.

Is that something that may be possible with the latest release?

Thanks for your help!


Maria Costa-Stienstra

Hi, Matt and Faffie.

Thank you for reaching out!

While you can't access the Scene.ElapsedTime or Slide.ElapsedTime values from a different scene/slide, one suggestion would be to assign it to a variable, which you would then display on your end slide. 

This will look differently depending on how you set up the course (is the navigation restricted? How many slides are in a scene? Does the user click a button to go to another scene? etc.), but as examples:

  • Set Slide1Time to variable Slide.ElapsedTime when the timeline ends on this slide.
  • Set Scene1Time to variable Scene.ElapsedTime when the user clicks Next.

I hope this helps!

Jonathan Huguenin

Hi everyone,

I don't know if this will help, but it is possible to modify the numbers with other variables to make the numbers a little more representative (why not for a report for example).

It's not perfect, but maybe it can help.

I just created 2 new variables "minutes" and "seconds" and created a mathematical division with the triggers.

My English is not very good, the screenshot will probably be better 😉

Good day to all.

Glenda DeHoff

I am trying to hide the button that completes the course until a video (hosted on Wistia) completes using the new built-in variable -  Slide.ElapsedTime., but it is not working. The variable is changing, but the button does not appear.  Has anyone been able to get something like this to work? I'd greatly appreciate any input!

My code is this:

Change the state of BTN Complete Course to Normal

When Slide.Elapsed Time changes

if Slide.ElapsedTime = 5000.

Glenda DeHoff

I created a timer on a slide master to track how long it takes a user to complete the quiz. It works great the first time through, but I cannot figure out how to reset it if the user wishes to take the quiz again. I tried setting Scene.ElapsedTime to zero, but my display variables rush through the first few seconds to get back to the total elapsed time for the scene. Does anyone have a suggestion? I attached an abbreviated version of the assessment and marked the correct answers. TYIA!