move shape by variable length

Apr 01, 2022

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 text to be legible at any resolution.

10 Replies
Thaddeus Ashcliffe

The other similar approach is to:

Move Object along Motion path X
when Numeric_Entry changes

Then have a number of

Move Object X+ {1.2.3...) along Motion Path X+ {1.2.3...)
when Motion Path X+ {1.2.3...)-1 completes
If Numeric_entry >/= X+ {1.2.3...)

This will work but it is labor intensive and fragile. 

Math Notermans

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});