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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SheppardDigitalAuthor Commented:
I've resolved this issue myself, user error.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.