Forum Discussion
MathNotermans-9
4 years agoCommunity Member
GSAP, x-y transformation in the Modern Player
As some other users in other posts commented when resizing/scaling your browser a Storyline using GSAP for animation will loose its proper positioning and that ain't fun. Allthough i had that fixed ...
DolandRuiz
2 years agoCommunity Member
Basic question incoming!
Hi Math, I've been trying to figure out how to move an element by a certain amount instead of placing it in the designated x position. I've tried using your getProperty code above and doing something like:
var XPos = gsap.getProperty(myElement, "x");
gsap.to(myElement, {duration:.2, x:"XPos+25"});
but as you can tell, that didn't work. I'm trying to use a keypress to move x left / right.