Forum Discussion
JJCarter
9 months agoCommunity Member
2 Error Messages in Console
Hello all!
I have a project that is running into 2 errors at the moment. One is that if I have an object that had a trigger then gets deleted, it still shows up under an option in Triggers. Th...
MathNotermans-9
9 months agoCommunity Member
Your setup was unneeded complex. And you missed a few essential things.var Ada = document.querySelector("[data-acc-text='Ada']");
var targetShp = document.querySelector("[data-acc-text='targetShape']");
var adaX = gsap.getProperty(Ada, "x");
var targetX = gsap.getProperty(targetShp, "x");
One of these was the way you select elements in Storyline. The acc-name is the easiest way to select an element. You can use ids and tags, but then you have to make sure your element IS INDEED selected.
Also by not knowing the gsap syntax you miss essentials. As there is 'getProperty'. This gsap-helper function gets any attruibute from a DOM-element.
That being said...here is a proper sample working only on x-axis. The rest is up to you.
Kind regards,
Math