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
... View more