Skip to main content
Participant
May 12, 2006
Question

bookmark and retrieve lesson location from LMS using SCORM

  • May 12, 2006
  • 3 replies
  • 1003 views
Hello,

I'm looking for some help with my actionscript and suggestions on anything else (changes in the javascript/html template) that I might need to successfully bookmark. I have a file that tracks approrpiately in my LMS using fscommand and basic scorm calls (LMSInitialize, LMSFinish, etc...). However, I'd like to be able to bookmark the last frame accessed, pass that info to the LMS, and have it retrieved by my flash file and return the user to the place they left off. I have found many posts on different forums on this subject, but I've tried all of the suggestions and nothing seems to work. I don't know if I'm missing something in my actionscript, or missing something in the html/javascript code, but it's not working. Below I've pasted my latest try at getting this to work. If anyone out there has done this before and could take a look at my code and tell me what I'm missing, I would appreciate it greatly.

//code for button which will send value to the LMS
on (release) {
fscommand("LMSSetValue","cmi.core.suspend_data,2");
fscommand("LMSSetValue","cmi.core.exit,suspend");
fscommand("LMSCommit","");
fscommand("LMSFinish","");
}

//code for button retrieving location
on (release){
fscommand("LMSGetValue","cmi.core.suspend_data")
gotoAndStop("cmi.core.suspend_data");
}

I've also tried using cmi.core.last_location, in the same manner as suspend_data is used above and neither seems to work. I've read that there may be a delay with using LMSGetValue, so, in addition, I've tried adding the get value to the first frame and then not trying to retrieve the value until the second frame, but that doesn't seem to work either. Do I need to add something to the html file after it is published? Any other suggestions?

Any help that someone out there could provide would be much appreciated. Thanks!
This topic has been closed for replies.

3 replies

Participant
May 16, 2006
I've found some documentation on ExternalInterface, but I'm still confused as to how this would be used with SCORM calls. To try to familiarize myself with this, I tried to replace my fscommands with the appropriate ExternalInterface commands, but now the completion status won't be passed to my LMS.

//code in first frame of flash file
import flash.external.ExternalInterface;
function initializeLMS () {
ExternalInterface.call("LMSInitialize","");
getlasterrorLMS ();
}


//code in last frame of flash file
function finishLMS () {
import flash.external.ExternalInterface;
ExternalInterface.call("LMSSetValue","cmi.core.lesson_status,completed");
ExternalInterface.call("LMSFinish","");
}

If anyone out there can take a look at this and let me know what I'm doing wrong, and also what more would be needed to make the bookmarking work (does suspend_data or last_location work well with ExternalInterface and how to I implement that?)... Thanks in advance for any help.
Participant
May 16, 2006
Tim,
Thanks for the information. I have Flash 8 and I found some documentation on ExternalInterface, so I'm going to try that. I appreciate your help.

Participating Frequently
May 13, 2006
The "fscommand" is used to send information FROM Flash TO JavaScript, it will not retrieve information from JavaScript. You will have to use JavaScript to send information back to into Flash. If you are using Flash 8 then I would recommend using the new ExternalInterface class. It will make talking between Flash and JavaScript pretty straight forward. If you are using Flash 7 or earlier then your best bet is the Flash/JavaSCript Intergration Kit ( http://osflash.org/doku.php?id=flashjs). It will give the best of what you will need.

Tim