分享

Flash动画包装成SCORM1.2标准的SCO - CourseOL课件制作服务 课件制...

 lingbo170 2009-12-05
网络上经常有人问起,我做的FLASH动画怎么做成SCORM1.2标准的课件?我改如果用FLASH制作符合SCORM1.2标准的SCO,今天终于找到了一个工具,大家一起分享。
下载软件FlashAPI.zip
是一个FLASH的源文件,里面已经定义和使用了一些SCORM1.2标准的函数,具体使用说明
// Copyright 2005 DotNetSCORM
http://www.
This is a small movie intended for use as a template for Flash-based SCOs. It is a single frame of Actionscript that performs several "introductory" LMS communications.

When using this movie, please keep in mind the following:

1. Use a pre-loader. You can insert your pre-loader code anywhere between frames 1 and 9.
2. Do not insert any LMS-dependent code before frame 11.
3. When possible, use the API's variables via _root.variable and _parent.variable.
4. If you make additional LMSGetVariable calls, use a _root.watch mechanism.
5. Be sure to add LMSFinish at the end of your movie.

//Variable Definitions
var bookMark, studentName, studentStatus, studentLocation, objStatus, lastError;
var tmpBkMark, tmpName, tmpStatus, tmpLocation, tmpObjStatus, tmpError;
var lmsInitialized, dataGathered;

//Initialize LMS
fscommand("LMSInitialize");
fscommand("LMSGetLastError","tmpError");

//Trap Initialization Errors
_root.watch('tmpError', divineError);
function divineError() {
lastError = arguments[2];
if ((lastError != 0) && (lmsInitialized = null)) {
getURL("javascript:alert(\"Error: Unable to initialize LMS.\")","_blank");
lmsInitialized = false;
}
else { lmsInitialized = true; }
}

//Start LMS Interaction
if (lmsInitialized == null) { _root.watch('lmsInitialized', startInteraction); }
function startInteraction() {
if (lmsInitialized) {
//Set Lesson Data
fscommand("LMSSetValue","cmi.core.lesson_status,incomplete");
fscommand("LMSSetValue","cmi.core.exit,suspend");
//Get Student Information
fscommand("LMSGetValue","cmi.core.student_name,tmpName");
fscommand("LMSGetValue","cmi.core.lesson_location,tmpLocation");
fscommand("LMSGetValue","cmi.suspend_data,tmpStatus");
dataGathered = 0;
}
}

//Trap Student Information Variables
_root.watch('tmpName', setName);
function setName() { fullName = arguments[2]; dataGathered++; }
_root.watch('tmpLoc', setLocation);
function setLocation() { bookMark = arguments[2]; dataGathered++; }
_root.watch('tmpStatus', setStatus);
function setStatus() { var studentStatus = arguments[2]; dataGathered++; }
_root.watch('tmpObjStatus', setObjStatus);
function setObjStatus() { var objStatus = arguments[2]; dataGathered++; }

//Wait For Information
if (dataGathered != 4) { _root.watch('dataGathered', startMovie); }
else { _root.nextFrame() }

function startMovie() { _root.nextFrame() }

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多