• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Restart presentation in Capitvate 2019 after some minutes

New Here ,
Dec 03, 2019 Dec 03, 2019

Copy link to clipboard

Copied

In Captivate 2019 I have made a museum presentation with some choices for the user underways. If the presentation has been left unused for for example 2 minutes I want it go bach to slide 1.

It can be done in Apple Keynote and PowerPoint. How do I do in Captivate?

TOPICS
Advanced actions , Audio and video , Editing , Presenter

Views

529

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 05, 2019 Dec 05, 2019

Copy link to clipboard

Copied

Hi Ebbek,

as far as I can see, there is no ready-made solution in Captivate like it seemingly is in Keynote and Powerpoint according to you.  But you can do it with Javascript.

Step 1

In Captivate in your project create/save under Project/Variables two Variables:

  1. userActionEvent
  2. inactiveTimer

Leave for both Variables the Value field empty, we will supply values in the following Javascript which you enter in each slide where you want to run this 'inactiveTimer'.

Step 2

In such a slide select under On Enter the action: Execute JavaScript.

In the Script Window enter this:

 

 

function setInactiveTimer() {
	window.cpAPIInterface.setVariableValue("userActionEvent", false);
	window.cpAPIInterface.setVariableValue("inactiveTimer", window.setTimeout(function(){gotoSlideOne();},1000*60*2));
}	
setInactiveTimer();

function gotoSlideOne() {
	if (!userActionEvent) {
		window.cpAPIInterface.setVariableValue("cpCmndGotoSlide", 0);
		window.cpAPIInterface.setVariableValue("cpCmndResume", 0);
	} else {
		setInactiveTimer();
	}
}

function interactionHandler() {
	window.cpAPIInterface.setVariableValue("userActionEvent", true);
}

 

 

What this does is when the Slide starts, we set a window.setTimeout to 1000 (milliseconds) * 60 (seconds) * 2 (minutes). If after two minutes there was no user interaction this timeout will execute the function gotoSlideOne(). We check a possible user interaction with the Variable userActionEvent.

Step 3

So whatever Actions you apply to interactive objects (buttons) on your slides you have to set up an Advanced Action where you include the action Execute JavaScript with this line in the Script Window:

 

 

interactionHandler();

 

 

which sets the Variable userActionEvent to true (meaning that in the last two minutes a user interaction has happened). In that case when gotoSlideOne() is triggered it would not navigate to Slide 1 (which is 0 for the cpCmndGotoSlide System Variable). Instead it would refresh the inactiveTimer to a new 2 minutes cycle.

 

To find out more about the used technicalities, see

Adobe Captivate variables (here particularly the section MOVIE CONTROL) and

Window setTimeout() Method.

 

Hope, this can help

Klaus

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 05, 2019 Dec 05, 2019

Copy link to clipboard

Copied

sorry, the line

window.cpAPIInterface.setVariableValue("cpCmndResume", 0);

is wrong, it should be

window.cpAPIInterface.setVariableValue("cpCmndResume", 1);

what it does is to continue playing the Captivate Movie once Slide 1 is reached. Set the value to 0 if you don't want this.

Klaus

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 11, 2019 Dec 11, 2019

Copy link to clipboard

Copied

LATEST

Hi Klaus

Thank you very much for your answer. Step 1 and 2 was very easy, but I have not yet had the time to explore step 3 fully. I'll return to you if I run into trouble 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources