GSAP, x-y transformation in the Modern Player
Mar 12, 2021
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 for quite a while i didnot have the time to post about it. Well here is a solution. In the attached Storyline there is a function called 'get_XYPos()'. That function returns an array with the x and y value of the object you are using. In the Storyline there is a GSAP timeline looping a shape to scale up and down. A small rectangle (1 x 1 ) is positioned in the Storyline and used as reference to the correct position. On resizing the browser window, a function is called killing the GSAP timeline tween and then getting the new x/y positions and setting the circle to that new correct position.
Then the looping GSAP timeline resumes and the animation continues...
48 Replies
This post was removed by the author
A curious thing happens with the new getProperty(...) suggested as alternative to getXYPos(). It doesn't give the same results. A slight difference but (and that's the worst) not constant. It makes the animation slowly drift away...does it occur to anyone else? Once again thanks Math, you're an absolute reference.
Have not noticed that before. In the latest Storyline version ? Is there maybe some other script actively moving the element pixel by pixel ? Do share a sample...easier to debug...