Control Event Video with JavaScript

September 20, 2017
I've been an eLearning designer and developer since 2005. In 2015 I started my own eLearning design company. To help promote my business, I began to create Adobe Captivate video tutorials on YouTube: https://YouTube.com/PaulWilsonLearning These videos are used to attract potential clients looking for a skilled eLearning designer and developer. This strategy has proved successful as I've worked with clients from all over the globe, helping them build highly engaging eLearning solutions. My YouTube channel presented an additional benefit of attracting aspiring Captivate developers to seek me out as a teacher. I now offer both online and onsite training on Adobe Captivate, teaching the skills users need to build engaging and interactive learning.
Legend 377 posts
Followers: 296 people
eLearning Designer, Developer and Teacher
11

Control Event Video with JavaScript

I've been an eLearning designer and developer since 2005. In 2015 I started my own eLearning design company. To help promote my business, I began to create Adobe Captivate video tutorials on YouTube: https://YouTube.com/PaulWilsonLearning These videos are used to attract potential clients looking for a skilled eLearning designer and developer. This strategy has proved successful as I've worked with clients from all over the globe, helping them build highly engaging eLearning solutions. My YouTube channel presented an additional benefit of attracting aspiring Captivate developers to seek me out as a teacher. I now offer both online and onsite training on Adobe Captivate, teaching the skills users need to build engaging and interactive learning.
Legend 377 posts
Followers: 296 people
September 20, 2017

In this video tutorial, I will show you how you can create a play/pause toggle button to control your Adobe Captivate Event Videos using a mixture of advanced actions and JavaScript.

Adobe Help Page Mentioned in Video
https://helpx.adobe.com/captivate/using/event-video.html

 

Comments (11)
2018-05-10 14:45:42
2018-05-10 14:45:42

You can run a small amount of Javascript as an action associated with specific activities in Adobe Captivate. The Javascript can be run when a user clicks on a button, shape used as a button, click box but also when a user arrives on a particular slide. For example, if you create a software simulation, you could add a blank slide that has an on-enter action. That action could be Execute Javascript. Inside the script window enter in the alert function you wish to use.

Like
2018-05-09 03:44:18
2018-05-09 03:44:18

hi, paul excellent tutorial…

i want asking something, now i am working develop simulators for programs so, i need to know how execute a alert in javascript when the simulator finish?

Like
(1)
>
josep93895764
's comment
2018-05-10 14:02:40
2018-05-10 14:02:40
>
josep93895764
's comment

alert(‘your message’)

Like
2018-04-05 15:56:31
2018-04-05 15:56:31

Hi Paul. This is great! it actually reminds me some line codes from flash as3.

In my case I would like to drag a graphic from left right to change video and go back forward in video time.

is there any: document.getElementsByTagName(“video”)[0].goTo(#frame) ?

So I could do a map() function from min to max of x position of the graphic to start and end of the video?

Any idea on how to do that?

Like
(1)
>
Mytsos
's comment
2018-04-06 15:07:53
2018-04-06 15:07:53
>
Mytsos
's comment

You could do this with a Vimeo embedded and then use their API.

https://elearning.adobe.com/2018/02/vimeo-buttons-sample-file/

Like
2018-01-23 20:35:49
2018-01-23 20:35:49

Great video! Thanks for sharing! Do you have any tips on how to have the video be paused when you enter the slide until the user clicks the external (manually made) play button? I know you can usually uncheck the autoplay box in the videos properties, but when you set the video skin to none this option becomes greyed out and it is checked automatically 🙁

I’ve tried adding an on enter action to the slide where it executes javascript and I add ‘document.getElementsByTagName(“video”)[0].pause();’ to the window, but that doesn’t work. Seems the autoplay function is fired off first or something?

Like
(1)
>
keelym35886708
's comment
2018-01-23 20:54:08
2018-01-23 20:54:08
>
keelym35886708
's comment

My own question was just answered thanks to another forum user at this post here – https://forums.adobe.com/thread/2441199

If anyone else has the same issue!

Like
2018-01-09 12:08:56
2018-01-09 12:08:56

I need to do that with youtube or vimeo embedded videos – how to?

Like
(1)
>
juliobrix
's comment
2018-01-10 01:47:12
2018-01-10 01:47:12
>
juliobrix
's comment

Julio, I’ve never created Javascript controls for YouTube or Vimeo videos. You should post this as a new question to get more people to see it and possibly get an answer sooner.

Like
2017-09-21 12:05:58
2017-09-21 12:05:58

Thank you Paul for this wonderful video.

I have added a link to this video from the help page.

Like
(1)
>
Saurav Ghosh
's comment
2017-09-21 16:22:22
2017-09-21 16:22:22
>
Saurav Ghosh
's comment

Cool thanks.

Like
Add your comment