在网络上经常有人问起,我做的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() } |
|