Skip to content

Instantly share code, notes, and snippets.

View pipwerks's full-sized avatar

Philip Hutchison pipwerks

View GitHub Profile
@pipwerks
pipwerks / captivate.js
Created January 13, 2012 22:18
Captivate SCORM 2004 Output, cleaned up Captivate_DoExternalInterface
// set document.domain property here, if it works for your environment/SCORM implementation
// document.domain="";
var strURLFile = "sample.swf", // Name of the flash file
flashvars = {},
params = { bgcolor: "#f5f4f1", menu: "false" },
attributes = { id: "Captivate", name: "Captivate" },
CaptivateSWF; //Cache the reference to the SWF to avoid future lookups
function callbackFn(e){
@pipwerks
pipwerks / captivate.js
Created January 13, 2012 22:58
Captivate SCORM 2004 Output, removed getAPI timer, only embed SWF if API found
// set document.domain property here, if it works for your environment/SCORM implementation
// document.domain="";
var strURLFile = "sample.swf", // Name of the flash file
flashvars = {},
params = { bgcolor: "#f5f4f1", menu: "false" },
attributes = { id: "Captivate", name: "Captivate" },
CaptivateSWF; //Cache the reference to the SWF to avoid future lookups
function callbackFn(e){
@pipwerks
pipwerks / captivate.js
Created January 13, 2012 23:25
Captivate SCORM 2004 Output, replaced findAPI and getAPI code
// set document.domain property here, if it works for your environment/SCORM implementation
// document.domain="";
var strURLFile = "sample.swf", // Name of the flash file
flashvars = {},
params = { bgcolor: "#f5f4f1", menu: "false" },
attributes = { id: "Captivate", name: "Captivate" },
CaptivateSWF; //Cache the reference to the SWF to avoid future lookups
function callbackFn(e){
@pipwerks
pipwerks / captivate.js
Created January 13, 2012 23:46
Captivate SCORM 2004 Output, replaced unload handler
// set document.domain property here, if it works for your environment/SCORM implementation
// document.domain="";
var strURLFile = "sample.swf", // Name of the flash file
flashvars = {},
params = { bgcolor: "#f5f4f1", menu: "false" },
attributes = { id: "Captivate", name: "Captivate" },
CaptivateSWF; //Cache the reference to the SWF to avoid future lookups
function callbackFn(e){
@pipwerks
pipwerks / log.txt
Created January 14, 2012 07:13
Captivate SCORM 2004 Course -- logged calls to Captivate_DoExternalInterface
Captivate_DoExternalInterface: Initialize, , ''
Captivate_DoExternalInterface: GetValue, cmi.entry, ''
Captivate_DoExternalInterface: GetLastError, , ''
Captivate_DoExternalInterface: SetValue, cmi.exit, suspend
cmi.exit(suspend) is not cached. Sending to LMS.
Captivate_DoExternalInterface: GetLastError, , ''
Captivate_DoExternalInterface: GetValue, cmi.location, ''
Captivate_DoExternalInterface: GetLastError, , ''
Captivate_DoExternalInterface: GetErrorString, 403, ''
Captivate_DoExternalInterface: GetValue, cmi.score._children, ''
@pipwerks
pipwerks / captivate.js
Created January 14, 2012 07:14
Captivate SCORM 2004 Output, improved SCORM handling
/*global swfobject, SCORM_API, initializeSCORM */
// set document.domain property here, if it works for your environment/SCORM implementation
// document.domain="";
var strURLFile = "sample.swf", // Name of the flash file
flashvars = {},
params = { bgcolor: "#f5f4f1", menu: "false" },
attributes = { id: "Captivate", name: "Captivate" },
CaptivateSWF; //Cache the reference to the SWF to avoid future lookups
@pipwerks
pipwerks / scorm_support.js
Created January 14, 2012 07:57
Captivate SCORM 2004 Output, preventing redundant GetLastError calls
/*global CaptivateSWF */
var SCORM_API = null,
unloaded = false,
isInitialized = false,
isTerminated = false,
courseStatus,
value_store = [],
lastCommand,
setValueWasSuccessful = true;
@pipwerks
pipwerks / log.txt
Created January 14, 2012 08:06
Captivate SCORM 2004 Course -- logged calls to Captivate_DoExternalInterface
SCORM initialized. Ready to go!
http://cloud.scorm.com/content/courses/FTYR5Q0IM4/Archive4056f446-8c7e-4794-82d1-5c9f40b2a302/0/MMTracking.swfFailed to load resource: the server responded with a status of 404 (Not Found)
Captivate_DoExternalInterface: Initialize, , ''
Captivate_DoExternalInterface: GetValue, cmi.entry, ''
Captivate_DoExternalInterface: GetLastError, , ''
Captivate_DoExternalInterface: SetValue, cmi.exit, suspend
cmi.exit(suspend) is not cached. Sending to LMS.
Captivate_DoExternalInterface: GetLastError, , ''
Last Get/Set was successful. Preventing pointless GetLastError invocation.
Captivate_DoExternalInterface: GetValue, cmi.location, ''
@pipwerks
pipwerks / sample.htm
Created January 17, 2012 07:06
Captivate SCORM 2004 Output, eliminate captivate.js
<!-- Copyright [2008] Adobe Systems Incorporated. All rights reserved -->
<!-- saved from url=(0013)about:internet -->
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script src="standard.js"></script>
<script src="SCORM_support/scorm_support.js"></script>
@pipwerks
pipwerks / sample.htm
Created January 17, 2012 08:22
Captivate SCORM 2004 Output, created CONFIG object
<!-- Copyright [2008] Adobe Systems Incorporated. All rights reserved -->
<!-- saved from url=(0013)about:internet -->
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@MOVIETITLE</title>
<script>
// set document.domain property here, if it works for your environment/SCORM implementation