Explore the community Forums CenarioVR CenarioVR Questions & Answers CenarioVR and Lectora talking Reply To: CenarioVR and Lectora talking

#413182 Score: 0
Profile photo of Geminys SL
Geminys SL
Member
beginner
intermediate
curious george
wise owl
friend finder
contributor
1 pt
@gsl4958

Hello! I finally solve the problem!

My listener was not listening (obviously) to the CenarioVR events so I thought that might be reason of the depth of the iframes generated for the SCORM content.

 

Finally I changed the listener to the parent window and it works correctly:

window.parent.addEventListener(‘message’, function(event) {
var data = JSON.parse(event.data);
console.log(data);

var messagedatatype = data.type;
if (messagedatatype==’cenariovr:clicked’) {
if(data.object == ‘cabina – tensiometro’){
callActionGroup(‘showtensiometro’);
}else if(data.object == ‘cabina – medidor’){
callActionGroup(‘showmedidor’);
}else{
console.log(“Hotspot Clicked: ” + data.object );
}
}
}
);

 

Thanks for all! 🙂