The slide duration widget provides the developer with the slide’s time, a data that is unfortunately not directly available from the Captivate Variables. The use of the widget is fairly simple. Insert the widget on the slide you wish to get the time.
In the Widget Properties Dialog, insert the name of the variable that will hold the slide’s duration. It can be any name you wish. We will later use that name to setup a Captivate user variable.
Now, from the Captivate Variable Dialog (accessible from the Project… menu), add a new variable with exactly the same name that you entered in the widget Properties Dialog. Make sure that you set the value of the variable to zero. Also beware, the name is case sensitive! Now close the dialog.
The final step is to use the variable in a Caption or in any other way you want. For example, we have inserted the name of the variable holding the slide duration inside a caption. Note that the name of the variable is enclosed between double dollar signs as this is mandatory if you want Captivate to replace the variable with the actual value at runtime.
UPDATE: As Lieve mentioned in the comments, it’s a good practice to insert variables using the button in the format section of the properties panel. This way, you just need to position the caret where you want to insert the variable and click on the button. The variable, enclosed with the proper control characters, will be automatically inserted into your text thus avoiding some typo errors. However, this implies that you already have added the variable in the variable dialog first.
So, give it a try and have fun! You can download the widget below.




Subscribe to the feed
December 4th, 2010 at 04:28
Thanks, Yves, for upgrading this widget to CP5. Hope you do not mind me pointing to a typo: in CP the variable is not included in double quotes but in double $$. Moverover to avoid multiple questions it would be fine if you indicate that is a good practice to choose the variable to be inserted with the X symbol in the Format region of the Properties panel. That will avoid issues with the case sensitivity of variables.
December 4th, 2010 at 07:43
Hi Lieve,
Thanks for nothing this. I corrected the mistake and added a small section to talk about inserting variables through the button. You’re the Captivate Queen! Me, I’m just a Captivate Widget Ninja at your service … the King title having already been claimed by Tristan
Yves
December 4th, 2010 at 07:45
Another UPDATE. I replaced the zip file with the widget. I had the widget file renamed with the extension .wdgt but that didn’t work well in some cases. So I added both the .swf and a .wdgt folder.
So, I you have previously downloaded the widget and got an error when inserting it in your presentation, just download the new version.
Yves
December 5th, 2010 at 21:10
Thanks Yves
I have already insert your wdgt into my CP CS5. it’s work. But the widget i wish to display the current timer. Like mm:ss/ total mm:ss .(00:35/02:05). as a runtime. the mm:ss must to be display current frame time. So I just want a Timer.
thanks again for your kind to help us.
jsh
December 6th, 2010 at 03:25
@jsh It is rather easy to insert a timer at runtime for the whole project, without needing a widget, but just using the system variable cpInfoElapsedTimeMS. It will show up in MS but you can translate it with some maths to whatever you want. More maths should be needed to calculate the current frame time but it is possible.
September 23rd, 2011 at 13:45
I inserted this widget, and followed your instructions above, but the slideDuration always shows as zero. What do you think I did wrong?
–Julie