传递引人入胜的参数 [英] Passing Captivate Parameters

查看:61
本文介绍了传递引人入胜的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想跟踪用户何时观看了Captivate(Flash 10.0)视频教程.为了做到这一点,我需要传递两个参数(员工ID和哪个教程),并在完成后让视频使用传递的值调用网址.我认为我可以在开始时将参数传递给turorial,但是我不确定在视频播放完后如何将其取回.视频的结尾将带有一个已完成"按钮,用户可以单击该按钮,但是我不确定如何处理参数及其值.

I want to track when users have viewed a Captivate (Flash 10.0) video tutorial. In order to do this I need to pass two parameters (employee ID and which tutorial) and have the video call a url with the passed values when it's done. I think I can pass the parameters to the turorial when it starts but I'm not sure how to get them back out when the video is done. The end of the video would have a "Completed" button the user would click but I'm not sure how to address the parameters and their values.

推荐答案

最简单的方法是将参数放在HTML文件的 JavaScript 中,而不是Captivate文件中.除非您在其他地方使用它们,否则实际上没有理由将这些参数传递给Captivate文件.

the simplest way to do it is to place the parameters in the HTML file's JavaScript and NOT in the Captivate file. There's really no reason to pass the params to the Captivate file unless you're using them elsewhere.

如果您具有JavaScript的参数,在Captivate视频幻灯片的末尾,您只需调用一个JavaScript函数即可处理将数据发送到LMS.

If you have the params in JavaScript, at the end of the Captivate video slide you can simply invoke a JavaScript function that handles sending the data to your LMS.

var employeeID = "abc123";
var tutorialID = "tutorial_01";

function setTutorialToComplete(){
   var url = "http://www.yoururl.org/index.html?emp=" + employeeID + "&tut=" + tutorialID;
   //use the URL somehow. maybe use ajax to do a post/get using your vars
}

在Captivate文件中,只需在视频播放完毕后调用setTutorialToComplete().

In your Captivate file, just invoke setTutorialToComplete() when the video has finished.

这篇关于传递引人入胜的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆