Forum Discussion
[JS] SET OBJECT POSITION
What is funny to select the right item from the array you need to count how high is the element on the timeline. In this example soccer image is on 14th position from the bottom and because in JS array start from 0 position thus I pick 13th element.
- WillP5 years agoCommunity Member
Hi Przemyslaw. Thanks for the tips.
However, I noticed that when you resize the window to a smaller size the soccer ball goes out of bounds.
It seems that by using transform/translate, the pixels become realtive to the screen size. So the boundaries you set in your IF statements cease to work.
Any ideias how to guarantee that a 10px increment (as you set up in your project) remains as a 10px increment no matter what size you screen is?
Oh, and how did you find out that to storyline objects were defined by layers within an array? That was very helpful for my projects.
Related Content
- 6 months ago
- 10 months ago