Forum Discussion
ThaddeusAshclif
4 years agoCommunity Member
move shape by variable length
Is there a way to position and/or move a shape by a variable length. I know the slider trick. However I want to have text as part of the shape, and pictures do not render well enough for the tex...
MathNotermans-9
4 years agoCommunity Member
Suppose you have a Storyline variable distance... and a variable duration...
This code then gets those vars and acts appropriately...
let player = GetPlayer();let myDistance = player.GetVar("distance");let myDuration = player.GetVar("duration");let myShape = document.querySelector("[data-acc-text='someShape']");
gsap.to(myShape, { duration:myDuration, x:"+="+myDistance});
Related Content
- 7 months ago
- 12 months ago
- 12 months ago
- 12 months ago