Forum Discussion
GSAP Draggable
Storyline just includes basic GSAP. You can add plugins in different ways. Draggable seems to be quite small, so there is not a lot of overhead attached to loading it. A simple approach is to include the following script, triggered to run on timeline start.
var script = document.createElement('script');
script.src = "https://cdn.jsdelivr.net/npm/gsap@3.12.5/dist/Draggable.min.js";
script.onload = function() {
//Plugin now loaded. Do something here if you need to.
console.log("GSAP Draggable loaded");
}
document.head.appendChild(script);
You could put this on whatever slide you need to use it on, or on the master if you need it on all slides.
An alternative approach, and one that is better if the library is large or if you wish to include static code with your published module, is to load the plugin script only once from an included web object. To do that, see the following article for the code and procedure. It is pretty straighforward.
How to add jQuery or anyother external Javascript Library to Storyline | Articulate - Community502 Proxy Error
Thanks, Nathan
I remembered Math had a post I had trouble finding so thank you for the link.