Reputation: 2936
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 ?
Upvotes: 0
Views: 1848
Reputation: 1738
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».
Upvotes: 0
Reputation: 2936
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.zip
Upvotes: 0