Hi, I am using the game-frame component in my course. When I put it up on my server it works great. Once I complete the animation it marks it complete and can continue on. When I put in as a packaged course in my LMS it doesn't mark it complete once the animation finishes. It seems like it's not hitting the gamecomplete function only in the LMS, does anyone have a solution? Thanks in advance.
define("components/adapt-game-frame/js/adapt-game-frame",["require","coreViews/componentView","coreJS/adapt"],function(e){
var t=e("coreViews/componentView");
var i=e("coreJS/adapt");var n=false;
var s=t.extend({events:{inview:"inview"},
preRender:function(){
},
postRender:function(){
var e=this;
this.$(".gameIframe-object").ready(function(){e.setReadyStatus()})},
once:function(e){if(!e){
this.$(".gameIframe-object").attr("data",this.model.get("_source"));
this.model.set("_isFired",true);
}else{
return}},
gameComplete:function(e){
alert("I am hitting this function);
if(e.origin===this.model.get("_originURL"))
this.setCompletionStatus();
}},
inview:function(e,t){
if(t){n=this.model.get("_isFired");
this.once(n);
window.addEventListener("message",this.gameComplete.bind(this),false)}}});i.register("game-frame",s)
});