Skip to main content
garyc56322630
Known Participant
April 28, 2017
Question

CPAPI_SLIDEENTER in Captivate 2017

  • April 28, 2017
  • 1 reply
  • 305 views

Hi,

I was currently using the event listener in index.html to send SCORM information for each slide change. 

See piece of code (was given in a previous post)

************************

function initializeEventListeners()

{

if ( interfaceObj )

{

     if ( eventEmitterObj )

  {

         eventEmitterObj.addEventListener( "CPAPI_SLIDEENTER", function( e )

   {

    if ( typeof progressArray[ window.cpInfoCurrentSlide - 1 ] === 'undefined' )

    {

     progressArray [ window.cpInfoCurrentSlide - 1 ] = 1;

 

 

     var tempProgress = SCORM2004_CallSetValue("cmi.progress_measure", progressArray.length / window.cpInfoSlideCount );

     parent.parent.postMessage(progressArray.length / window.cpInfoSlideCount,"*");

    }

            });

 

  }

}

**********************************

 

I realized that the code has changed in the index.html file.

 

Do you have an idea how I can achieve this now?

 

Thanks!

This topic has been closed for replies.

1 reply

TLCMediaDesign
Inspiring
April 28, 2017

That can't be all of your code. Where is initializeEventListeners() being called?

Also, what part of the code is not working?

Have you tried to alert or console.log a message that the slide enter listener is being executed?