Skip to main content
cuacurie
Participant
October 3, 2016
Question

Event listener not working with Prime

  • October 3, 2016
  • 1 reply
  • 333 views

I'm using a simple JavaScript to capture button clicks for processing.  This script works fine when uploaded to SCORM Cloud but fails silently on Prime.  Any ideas?

window.cpAPIEventEmitter.addEventListener("CPAPI_INTERACTIVEITEMSUBMIT",function ( e ){

var clickedButton= e.Data.itemname;

window.cpAPIInterface.setVariableValue("clickItem",clickedButton);

});

I place this script in the actions of the master slide, then add a a few Smart Objects as buttons and a text caption to display the variable.  ON SCORM Cloud the text caption changes to the identifier of the clicked object.  In Prime it does nothing.

I dont see how to attach a sample file here but I can link one on request.

    This topic has been closed for replies.

    1 reply

    deepakg1988
    Inspiring
    October 3, 2016

    Hi Michael,

    I have send you an private message.

    Thanks

    Deepak