Also, if you are going to go the route of external JavaScript you might as well use the lside enter listener and just have it happen behind the scenes. You would never have to use any action in Captivate then. You could even show and hide the text caption that holds the variable.
window.addEventListener( 'moduleReadyEvent', function( event )
{
interfaceObj = event.Data;
eventEmitterObj = interfaceObj.getEventEmitter();
initializeEventListeners();
});
function initializeEventListeners()
{
if ( interfaceObj )
{
if ( eventEmitterObj )
{
eventEmitterObj.addEventListener( 'CPAPI_SLIDEENTER', function ( event )
{
var getSlides = cp.model.data.project_main.slides.split(",");
var idx = Number(window.cpInfoCurrentSlide);
if ( idx === 1 )
{
window.previousLabel = "";
window.nextLabel = cp.D[getSlides[idx]].lb;
}
else if ( idx === window.cpInfoSlideCount )
{
window.previousLabel = cp.D[getSlides[idx-2]].lb;
window.nextLabel = "";
}
else
{
window.nextLabel = cp.D[getSlides[idx]].lb;
window.previousLabel = cp.D[getSlides[idx-2]].lb;
}
});
}
}
}