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

CPAPI_SLIDEENTER in Captivate 2017

New Here ,
Apr 28, 2017 Apr 28, 2017

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!

287
Translate
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 ,
Apr 28, 2017 Apr 28, 2017
LATEST

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?

Translate
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