Skip to main content
Inspiring
November 10, 2016
Question

What JS event(s) are triggered when you open the Table of Contents?

  • November 10, 2016
  • 1 reply
  • 176 views

Hello,

This is perhaps a question best for TLCMediaDesign, but maybe someone else can help, too.

I would like to know what event(s) are triggered when cpCmndTOCVisible is toggled. 

The problem is that toggling cpCmndTOCVisble 'breaks' my play/pause button because doing so will make the movie start playing again, but my play/pause button remains in a "paused" state.  (My 'paused' state means the pause image is hidden and the play image is showing.)

So I figured I could listen for the TOC-toggle-event, and when it occurs, hide the play button and show the pause button....

Or if there are better ideas out there,  I am ears.  : ) 

Thanks for the help!

This topic has been closed for replies.

1 reply

TLCMediaDesign
Inspiring
November 10, 2016

What version of Captivate?

In CP8 we execute JS to have the option to select continue playing project. In CP9 you can use that option on simple actions.

We use a toggleTOC() function to control the TOC.

Most of our buttons execute JavaScript to control the functionality. The biggest issue is if you select continue playing project, this can release the playhead it the project is paused at the end of a slide.

If you don't select continue playing project, Captivate will pause the course and it can be almost impossible to get it to play again with JS. YOu need to be careful how you set everything up.

We run a cpInfoCurrentFrame variable change listener that catches a playhead release within 5 frames from the end of slide to hide the pause and play buttons, this reveals a greyed out button that is part of the interface. You can only use a next button or TOC to navigate.

Lilybiri
Legend
November 10, 2016

I often have both a TOC toggle button and a Play/Pause button in courses

without using JS, mostly with shared actions. Since you ask for JS, this is

irrelevant to your question.