Forum Discussion
Sliding Results Bar by Variable - impossible?
- 4 hours ago
If you examine the JS ,I think you'll find that this does actually move the bar according to the value of the variable (0 to 100). The movement itself is triggered by the incremental changes to a variable (starting at 0 and progressing to the final value), but that all happens inside the script trigger to move the bar. The actual distance is set by the variable currently attached to the slider.
While you can make a much more elegant progress bar using GSAP or even CSS animations through JavaScript, you can make a very basic progress bar using a motion path linked to a variable change trigger. This still uses JavaScript to update the variable via whatever process you desire, but it avoids a lot of the other issues created by modifying object positions outside of Storyline proper.
Basic demo of linking motion path: https://360.articulate.com/review/content/ad32b581-1869-417a-bdcb-c91399dbdcf4/review
This uses a motion path with a relative start position and no easing that moves a very small increment each time a variable changes. Update the variable to the desired endpoint in a JS trigger and the object will move along the motion path. The variable update process could be modified to accomodate your desired speed, easing, etc.