Articulate Storyline 支持 JavaScript 触发器,使您可以扩展课程的功能。storyline官方不提供 JavaScript 代码编写支持。
软件概况:Storyline最新版本3.20,Storyline3.10以下版本自带jQuery,Storyline3.10开始不支持jQuery。建议使用Storyline3.8,后续版本基本没有功能上的更新。
JavaScript适合人群:已经熟练掌握storyline软件并且具备Html、Css、JavaScrip和jQuery等基础知识的人员。如果开发人员具有asp、php等后端代码编写经验,效果更佳。
JavaScript的作用:
1.使用 GetPlayer()方法检索 Storyline 变量的值,并使用 SetVar 方法设置 Storyline 变量的值。也就是说,您可以使用 GetVar 从 Storyline 变量中提取信息,并使用 SetVar 向 Storyline 变量推送信息。
2.获取Storyline幻灯片中元素,然后编写代码修改元素的相关属性。
3.运ajax和asp,php等后端程序进行通讯。
附:
一、storyline3.10引入jQuery的方法
1.打开安装目录C:\Program Files (x86)\Articulate\Storyline 3\Content\dark-spider\classic\html5\lib\scripts下的app.min.js文件,在文件未尾加入以下代码。
2.在网上下载jQuery,重命名为jquery.min.js,复制到C:\Program Files (x86)\Articulate\Storyline 3\Content\dark-spider\classic\html5\lib\scripts目录。
var myCode = function() {
// Add your custom code with `$` or `jQuery` here.
}
if (window.$ != null) { // If jQuery has already loaded, run myCode.
myCode();
} else { // Else, load jQuery and then run myCode.
var jQueryLoader = document.createElement("script");
jQueryLoader.src = "html5/lib/scripts/jquery.min.js";
jQueryLoader.onload = function() {
jQueryLoader.onload = null;
myCode();
}
document.head.appendChild(jQueryLoader);
}
二、Articulate Storyline3发行说明