Forum Discussion
MathNotermans-9
8 months agoCommunity Member
Animate a dashed line in Storyline with GSAP
A Storyline user asked me how to do that. With the GSAP plugin DrawSVG that is quite easy. Showing how to get that done in this video. The code for selecting a SVG, its path and animating it, is ...
NathanStoker-c1
Community Member
Math, this is what I got. It's probably not the most efficient way, but it worked for me. What are your thoughts? I couldn't ever get the web object working. So this is just a javascript trigger.
const script1 = document.createElement('script');
script1.src = "https://cdn.jsdelivr.net/npm/gsap@3/dist/TextPlugin.min.js";
script1.async = false;
script1.onload = function() {
function animateText() {
const myText = document.querySelector('[data-acc-text="textIt"]');
// Set the initial font size and color:
myText.style.fontSize = "64px";
myText.style.color = "#007bff";
// Animate the text:
gsap.to(myText, {
duration: 2,
text: "This is the new text",
ease: "none"
});
}
animateText();
};
document.body.appendChild(script1);
MathNotermans-9
7 months agoCommunity Member
If it works, donot try to fix it ;-)