Talk to a SCORM sco?

Hi All,

I've created a simple SCORM(1.2) compliant sco using Articulate.

I've uploaded it to www.scorm.com and verified that it works and passes back the correct values etc.

In a bid to understand how it all works, I'm trying to create an API adapter so that I can receive the responses from the flash file.

I've tried my best, but I can't seem to get the flash file to call any of the javascript functions.

What I have is a HTML file with a link to start the SCO in a new window. The HTML page also runs the attached javascript code, Which creates an API object and the various function that the SCO should be calling, but none of the alerts are appearing as I run through the flash file.

Does anyone know what it wouldn't be working. There isn't anything wrong with the flash SCO.
function GenericAPIAdaptor(){
    this.LMSInitialize = LMSInitializeMethod;
    this.LMSGetValue = LMSGetValueMethod;
    this.LMSSetValue = LMSSetValueMethod;
    this.LMSCommit = LMSCommitMethod;
    this.LMSFinish = LMSFinishMethod;
    this.LMSGetLastError = LMSGetLastErrorMethod;
    this.LMSGetErrorString = LMSGetErrorStringMethod;
    this.LMSGetDiagnostic = LMSGetDiagnosticMethod;
	}
/*
* LMSInitialize.
*/
function LMSInitializeMethod(parameter) {
	alert('starting');
	return "true";
	}
/*
* LMSFinish.
*/
function LMSFinishMethod(parameter) {
	alert(parameter);
	return "true";
	}
/*
* LMSCommit.
*/
function LMSCommitMethod(parameter){return "true";}
/*
* LMSGetValue.
*/
function LMSGetValueMethod(element){
	alert(element);
	if (element == 'cmi.learner_name') {
		return "Shaun Sheppard";
		} else {
		return "";
		}
	}
/*
* LMSSetValue.
*/
function LMSSetValueMethod(element, value) {
	alert(element + ' - ' + value);
	
	return "true";
	}
/*
* LMSGetLastErrorString
*/
function LMSGetErrorStringMethod(errorCode){return "No error";}
/*
* LMSGetLastError
*/
function LMSGetLastErrorMethod(){return "0";}
/*
* LMSGetDiagnostic
*/
function LMSGetDiagnosticMethod(errorCode){return "No error. No errors were encountered. Successful API call.";}

var API = new GenericAPIAdaptor;

Open in new window

SheppardDigitalAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
SheppardDigitalConnect With a Mentor Author Commented:
I've resolved this issue myself, user error.

I was linking to player.html instead of index-lms.html
0
All Courses

From novice to tech pro — start learning today.