0

Im very much new to adobe captivate , and I had developed some tutorial using Captivate-9 and I want add some javascript code through Captivate editor , how to add ?

praveenpds
  • 2,936
  • 5
  • 26
  • 43
  • Well, I never use captivate but, I find this: https://helpx.adobe.com/captivate/using/responsive-project.html I hope this help you. – Ferrmolina Jan 13 '16 at 06:19

2 Answers2

0

These two links will help to understand how captivate and js works ..!!!

https://helpx.adobe.com/captivate/using/common-js-interface.html

working solution from Adobe tutorials.

https://helpx.adobe.com/content/help/en/captivate/using/common-js-interface/_jcr_content/main-pars/download/file.res/Common-JS-interface.zipenter image description here

praveenpds
  • 2,936
  • 5
  • 26
  • 43
0

You can include custom JavaScript files by adding them to the Captivate template folder, which Captivate uses to generate your published project.

When you are on Windows, your Captivate installation path may be something like C:/Program Files (x86)/Adobe/Adobe Captivate CC 2019.

In that directory, there is a HTML folder, which is the "template" folder I mentioned earlier.

In that folder, you can drop a custom .js file. Under the assets directory should be a good place.

To actually load the script, you have to load it in the index.html file.

For that, locate the following code in the index.html file:

var lJSFiles = [ @JSFILES_ARRAY ];
cpXHRJSLoader.js(lJSFiles, function () {
  /* … */
});

And replace it with:

var lJSFiles = [ @JSFILES_ARRAY ];
lJSFiles.push('./assets/custom.js');
cpXHRJSLoader.js(lJSFiles, function () {
  /* … */
});

Make sure to update the path to your custom JavaScript file to fit your needs (./assets/custom.js in the example above).


Article about the topic: «How to add custom JavaScript to Adobe Captivate Projects».

David Wolf
  • 1,400
  • 1
  • 9
  • 18