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

Toggle - Continue Playing the Project Issues

Explorer ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

Hello,

I am using Captivate 2019 v. 11.5.5.553. I have a project that uses a custom button set that includes CC, audio mute/unmute, replay (slide), play/pause, back, and next. The button set works great EXCEPT for the toggles (CC, play/pause, TOC). To be clear, the toggles work, but on stakeholder review, I received several comments that clicking the toggle buttons causes the timeline to continue whenever the timeline is at a pause point, so the pauses are bypassed (i.e., if there is an interaction where the learner has to click on something to continue or at the end of the slide, when the learner should have to click the next button). My initial thought was "Well, don't do that." but that won't fly.

I've read through the bulk of the posts on using toggle commands but have not seen one that quite fits my issue. It seems there are only two options - Continue Playing the Project checked or unchecked. Unchecking this is fine for the TOC because I have the Hide TOC action on enter for all slides but this is not acceptable for the CC and play/pause buttons. As part of the solution, I removed the play/pause but one of the stakeholders wants it back.

Am I missing something? Is there a solution?
As always, thanks to this helpful community.

TOPICS
Advanced , Advanced actions

Views

375

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

correct answers 1 Correct answer

People's Champ , Feb 09, 2022 Feb 09, 2022

For the play button to work correctly, do the following.

 

Create a variable in Captivate called "endSlide"

 

Execute this JS on slideEnter ( usually in an advancd action) of the first slide in the project:

 

window.cpAPIEventEmitter.addEventListener( 'CPAPI_SLIDEENTER', enterSlide, false );

var slideData;

function enterSlide( e )
{
slideData = e.Data;
window.endSlide = false;
window.cpAPIEventEmitter.addEventListener( 'CPAPI_VARIABLEVALUECHANGED', slideTimer, 'cpInfoCurrentFrame' );
}

function slide

...

Votes

Translate

Translate
Explorer ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

Have you tried to add 'Pause' to the end of the advanced actions script for the problomatic buttons? I assume your custom button set has advanced actions. 

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
Explorer ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

The CC and TOC use On Success: Toggle, Variable: cpCmndCC and cpCmndTOCVisible respectively.

The Play/Pause (which I removed long ago) does have a pause because that's how it works. The problem is, when paused at a timeline pause point, when you toggle it to play, it bypasses the pause.

Thanks for your reply.

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
People's Champ ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

You won't have that issue if you put you actions in Advanced Actions or make sure you don't have the continue playing project selected for a simple action.

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
Explorer ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

That fixed the CC and TOC buttons issue - such a simple solution. Oddly, in an earlier version, I had the CC button setup that way - not sure what led me to change it. I recently added the TOC button.

Thank you so much.

I still need to sort out the play/pause button functionality.

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
Community Expert ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

The Play/Pause button will be tricky on slides where you have pausing points. I mentioned this in my interactive video about a custom Play/Pause button. 

You would need to check if the timeline is paused already, which will probably need JS.

 

For the other custom buttons, use a shared action. Shared actions will never release the play head (likewise to advanced actions), but you can use the same shared action for multiple toggle buttons. Have a look at this blog:

Multiple Toggle buttons with ONE Shared Action - eLearning (adobe.com)

 

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
Explorer ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

TLCMediaDesign helped me sort my issue with the CC and TOC buttons. Here's my scripting for my Play/Pause button. It's a two-state button (pause and play) that toggles the button state images and pauses and plays the timeline. It's functioning as it's supposed to but the unwanted result is that when toggling from pause to play, it continues the timeline if the timeline is already paused, either for an interaction or at the end of the slide.Play_Pause Advanced Actions.jpg

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
People's Champ ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

For the play button to work correctly, do the following.

 

Create a variable in Captivate called "endSlide"

 

Execute this JS on slideEnter ( usually in an advancd action) of the first slide in the project:

 

window.cpAPIEventEmitter.addEventListener( 'CPAPI_SLIDEENTER', enterSlide, false );

var slideData;

function enterSlide( e )
{
slideData = e.Data;
window.endSlide = false;
window.cpAPIEventEmitter.addEventListener( 'CPAPI_VARIABLEVALUECHANGED', slideTimer, 'cpInfoCurrentFrame' );
}

function slideTimer()
{
if ( window.cpInfoCurrentFrame > slideData.to - 5 )
{
window.endSlide = true;
window.cpAPIEventEmitter.removeEventListener( 'CPAPI_VARIABLEVALUECHANGED', slideTimer, 'cpInfoCurrentFrame' );
}
}

 

Then use the endSlide variable in your play button action, yu'll need to flip your condition to be

 

if

cpCmndPause = 1

and endSlide = 0

 

change state

continue

 

else

change state

pause

 

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
Explorer ,
Feb 23, 2022 Feb 23, 2022

Copy link to clipboard

Copied

LATEST

Thanks again @TLCMediaDesign  - this works perfectly. The only thing I wasn't sure about was the Select Window drop down. I used Current Window. The only other thing I had to do was add a line to my default slide on enter script to change the button state to normal because if you click that button it will still change the state - but it doesn't advance, which is what I needed.

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