Display Time information

Update: if you use a recent version of Captivate, have a look at this updated post:

Display Time in CP2019

Intro

Again I want to post a detailed explanation to a question on the user forum, quote: ".... if there was anyway to insert running time".
The user did want to show the information that is normally in the TOC about the total duration of the project and the elapsed duration. This duration is the one that shows up in the Project Info panel (in Captivate 5.5) or in Project Info in the Preferences dialog box (Captivate 5.0). It is calculated as the sum of all the slide durations. Same for the elapsed duration that is calculated as the sum of the slide durations of the slides before the current viewed slide.

This is not the same as the real time spent by the user viewing slides, project.  This time can be made visible as well.

Example


Play this movie and watch the information I show on the slides:
  • in the first Text Caption top left, the total project duration like it is displayed in a TOC or in the Project Info
  • in the second Text Caption top right, the elapsed duration calculated as the sum of the slide durations before the current slide, with a percentage as well (how much of the movie has been viewed)
  • in the third Text Caption beneath the second one the real time already spent on the movie

Work flow


Variables


System variables used in this solution are:
  • rdinfoFPS : the framerate of the Captivate file (default is 30fps)
  • rdinfoCurrentFrame : the number of the frame where the playhead sits
  • rdinfoFrameCount : total number of frames in the project
  • cpInfoElapsedTimeMS : time elapsed since the published movie started, in milliseconds
 

I started creating some user variables
  • v_total : will store the total duration (in seconds) of the project 
  • v_total_min : will store the total duration of the project in minutes, I could have reused the user variable v_total, but the advanced actions will be easier to read
  • v_help : to store the frame number of the first frame of a slide (or when clicking the last 'Calc' button); this variable is reused a lot of times, contrary to the first 2
  • v_elap : the elapsed time (in seconds) calculated from the slide durations of the previous slides
  • v_elap_min : same elapsed time but in minutes; again I could have reused v_elap as well
  • v_perc : percentage of movie that has been viewed, calculated from v_elap and v_total
  • v_real : real time (in seconds) since the start of the movie; to illustrate what I mean by reusing, I used this variable if necessary also for the real time in minutes

Hide-and-Seek

Once I blogged: Playing Hide-and-Seek with Captivate objects and I used the information explained in that post to save time:
  • The first Text Caption, showing the total Project duration is really only on the first slide with a timing 'Display for rest of Project'; there are really 2 text captions:
    • NoMinutes: displays the information when the total duration is lesser than 60 secs, this caption is on top of the second Text Caption in the Timeline, thus hiding this caption that has exactly the same position and sidze (Transform accordion in Properties panel)
    • YesMinutes: displays the same information in minutes when appropriate, and will become visible by hiding the text caption NoMinutes
  • The text caption showing the Elapsed time and the Percentage is only on the second slide (see timeline of this slide in the Gallery), also with the timing  'Display for rest of Project'; again I have 2 versions of this caption
    • ElapMinNo : displays the information when the elapsed duration is lesser than 60 secs, this caption is on top of the second Text Caption in the Timeline, thus hiding this caption that has exactly the same position and sidze (Transform accordion in Properties panel)
    • ElapMinYes : displays the same information in minutes when appropriate, and will become visible by hiding the text caption ElapMinNo
  • The text caption showing the real time is also only on the second slide (see Timeline), with timing  'Display for rest of Project'; the 2 versions of this caption with same size and position are:
    • RealMinNo : for this information in seconds, sits on top of and hides
    • RealMinYes : for the information in minutes, will be visible when RealMinNo is hidden

Advanced actions

Only two conditional advanced actions are needed, I added them as images in the Gallery:

StartOne
This action will be triggered on entering the first slide, and its goal is to calculate the total project duration from the system variables rdinfoFrameCount and rdinfoFPS and show the appropriate Text Caption (NoMinutes or YesMinutes). Since this is a fixed time, nothing has to be changed later on. The action has two decisions:
  1. TotalCalc: which is really a standard action, where the total duration of the project is calculated
  2. Minutes: checks the value of v_total, if it is greater than 60, the duration in minutes is calculated and stored in v_total_min and the Text Caption NoMinutes is hidden, thus revealing YesMinutes
StartNext
This action is triggered on entering all slides except slide 1. It calculates both the elapsed and the real duration that will be shown  on entering each slide (like on the TOC). The system variable rdinfoCurrentFrame is used to store the number of the first frame of the slide in the user variable v_help. Both the duration in seconds and the percentage are calculated. The value of the real time is calculated in seconds. This action is also triggered by the Calc button on the last slide. It has three decisions:
  1. Elapsed: again a mimicked standard action that calculates the elapsed duration from the variables v_help and rdinfoFPS, the percentage from v_elap and v_total, the real time from cpInfoElapsedTimeMS
  2. ElapMin: checks the value of v_elap,  if it is greater than 60, the duration in minutes is calculated and stored in v_elap_min and the Text Caption ElapMinNo is hidden, thus revealing ElapMinYes
  3. RealMin:  checks the value of v_real,  if it is greater than 60, this variable is recalculated in minutes, and the Text Caption RealMinNo is hidden, revealing RealMinYes

Conclusion

I'm prepared to create a template with those advanced actions needed if you like my solution. My decision will be made based on the comments left on this blog :-)





 


10 responses
The elapsed time/real time/estimated time is excellent. I would be most interested in a template. I will try to work your suggestions into a test project to see if I can make it work. Thank you for this very useful and informative article. --Michael
Thanks Michael, happy that you find it useful. Will try to provide a template with the advanced actions. Let me know if you have issues working them out for yourself, it would be a great feedback.
Please, please create a Captivate to demonstrate this. I believe I have all the variables and advanced actions set up correctly, but it's not working.
What is this "if 1 is equal to 1 condition?
Have a look at this article: http://kb2.adobe.com/community/publishing/862/cpsid_86254.html

If I had more than 24 hrs a day I could blog a lot more and create tutorials, but that is not the case.

I would use the heck out of that template. I am still new to advanced actions and a little intimidated to try to write it myself.
Yes a template would be awesome! What about a timer that counts down on each question?
Sorry, post is two years old, should have to rework the template totally for recent version. And as you can see, I stopped blogging.
I agree. A template would be awesome! Thanks!
1 visitor upvoted this post.