I need to change sprite frames of an image in javascript function. Sprites are animated by changing background image position, which is simple, effective and elegant solution. But how to do it in javascript?
Reading some support questions I found the solution should be using setProperty() method, like this:
I found a file “Extended Saola Animate APIs.txt” which covers undocumented API. But there is no such property as “backgroundPositionX” in this file. So does “backgroundPositionX” exist? Is there any other way to change background image position in script?
Could you please include “backgroundPositionX” and “backgroundPositionY” in the file “Extended Saola Animate APIs.txt”? It would be really useful to have a complete list of properties. Right now it is not in the list nor in the API and the only way to learn how to animate sprites through script is to search the forum.
The most important thing is that it works and it is a powerful feature indeed!