SCORM API Wrapper [ActionScript]

Current versions:

  • ActionScript 2.0: SCORM.as v1.1 (April 23, 2008)
  • ActionScript 3.0: SCORM.as v1.1 (April 23, 2008)

Downloads & Examples:

  • All downloads (including examples) are located at the downloads page.

Having a problem with the classes or example files? Visit the eLearning Technology and Development Google Group.

LMS compatibility

The example files have been successfully tested on a variety of LMSs. If you’ve tested the files on an LMS not listed here, please let me know.

LMS SCORM 1.2 Example SCORM 2004 Example Notes
ADL Test Suites Works as intended Works as intended SCORM 1.2 Conformance Test Suite v1.2.7

SCORM 2004 3rd Ed. Conformance Test Suite v1.0.2

SumTotal TotalLMS 7.6 Works as intended Works as intended
Moodle 1.8 Works as intended Works as intended The manifest for the original SCORM 2004 example needed to be cleaned up before working in Moodle.
Ilias 3.9.3 Works as intended Works as intended Ilias loads SCORM 1.2 courses using the SCORM 2004 RTE and the ADL SCORM 1.2-2004 wrapper.
Pathlore 6.5 Not verified Not verified

General Notes:

  • These wrappers are designed to be SCORM version-neutral (they work
    with both SCORM 1.2 and SCORM 2004). They also require the pipwerks
    SCORM API JavaScript wrapper in the course’s HTML file. The
    wrapper can be downloaded from the downloads page.
  • These classes uses ExternalInterface. Testing in a local environment will FAIL unless you set your Flash Player settings to allow local SWFs to execute ExternalInterface commands. Change your security settings using this link.
  • These works are licensed under the Creative Commons Attribution 3.0 Unported License.
  • Use at your own risk! These classes are provided as-is with no implied warranties or guarantees.

ActionScript 2.0 SCORM API wrapper notes:

  • FLAs published using this file must be published using AS2.
  • This class uses ExternalInterface:
    SWFs published using this class will only work in Flash Player 8 or higher.

ActionScript 3.0 SCORM API wrapper notes:

  • FLAs published using this file must be published using AS3; SWFs published using this class will only work in Flash Player 9 or higher.

Relationships/Mapping

The following table of methods (functions) assumes you have declared the SCORM instance using the variable name scorm:

var scorm:SCORM = new SCORM();

Note about syntax:

  • You may replace scorm with any variable name you wish, such as var myScormData:SCORM = new SCORM();. I just think it’s easier to stick to the acronym scorm.
  • You cannot use the variable name SCORM (all uppercase) in AS3, such as

    var SCORM:SCORM = new SCORM();

    Doing so will return an error. Using scorm (all lowercase) works fine.

Public method SCORM 1.2 API Equivalent SCORM 2004 API Equivalent Returns
scorm.connect() API.LMSInitialize(“”) API.Initialize(“”) Boolean
scorm.disconnect() API.LMSFinish(“”) API.Terminate(“”) Boolean
scorm.get(parameter:String) API.LMSGetValue(parameter) API.GetValue(parameter) String
scorm.set(parameter:String, value:String) API.LMSSetValue(parameter, value) API.SetValue(parameter, value) Boolean
scorm.save() API.LMSCommit(“”) API.Commit(“”) Boolean
scorm.debugMode(boolean)

(sets mode)

n/a.

debugMode provides a clean method for viewing debugging messages in your format of choice. Just edit the class’s private __debugMode function as needed.

n/a.

debugMode provides a clean method for viewing debugging messages in your format of choice. Just edit the class’s private __debugMode function as needed.

none
scorm.debugMode

(returns current mode)

n/a n/a Boolean

New SCORM ebook coming soon!

I'm writing an ebook explaining how to build an HTML-based SCORM course. Subscribe to be notified when it's ready, as well as receive early bird pricing and some free goodies!

No spam, no sharing your email address, unsubscribe at any time. Powered by ConvertKit
Advertisements

6 Replies to “SCORM API Wrapper [ActionScript]”

  1. Hi, if you just want to deploy Flash, leverage FlashVars, push grades into Moodle 1.9’s grade book and have a gateway to web services (both Moodle’s and 3rd party), you might be interested in a project I’m working on. It’s only a developer preview at the moment and is a two part install – #1 an activity module and #2 the web services library/gateway part.

    It’s easy to install and use and I’ll upload a fully functioning version of the XML driven Flash word search activity very soon. It’s open source too: http://code.google.com/p/swf-activity-module/

  2. Hey, I am creating a web based training course with Adobe Captivate 5. My project has multiple modules which I am building and publishing as separate project files. These project files communicate with each other as they call one another on button click events. So…multiple modules created and they each have their own individual assessments (quizzes). As I understand this, LMS will only communicate with one HTML page and only the assessment project has SCORM scoring enabled on it.

    I am looking to communicate to the LMS from all the SWFs published. So when I do one quiz from one module, the LMS keeps track of it, and when I do another quiz from another module, the LMS keeps track of this also. I am also looking for the LMS to keep track of what page the user left off. Since I cannot keep track of multiple quizzes and such under one LMS project, I was looking to keep track of all this information on one HTML page via cookies or flashvars and then pass this info to the LMS system. Can someone point me in the right direction. I just want to know how to pass and retrieve variables between html and swf files, then use SCORM api to pass this info to LMS system.
    Thanks in advance.
    Tom

  3. In addition to the above comment, I have looked at a bunch of websites out there that have a bunch of mumbo jumbo and point you around in circles. I would think that if Adobe didn’t allow you to do this, they should at least have some articles or knowledge base documents out there on some workaround. Their website is lacking to say the least. I am trying to use ActionScript 3.

    Thanks,
    Tom

  4. Hi Tom

    Please repost this question in the eLearning Technology and Development Google Group. This page is not really appropriate for what you’re trying to achieve — Captivate uses its own JavaScript system for handling SCORM, and won’t work with the wrapper discussed on this page.

    A short answer for your question: If you were writing your own SCORM support, you could use SCORM’s interactions data model to store scores for individual quizzes. However, in your case it sounds like you should be using Captivate’s Aggregator feature to join your separate Captivate projects into a single course.

Comments are closed.