Ah, thank you kikito, I finally get it. Honestly I prefer to put in the coordinates in manually, rather than using your string shortcut, but it is a nice feature once you get used to it. Thanks again for the work you put in to all your wonderful libraries, you make the best ones.

then dealing with the varargs would get easier in trade for slightly more complex parsing (split at comma, tonumber() if theres no dash).
I think that looks a lot cleaner, mixing strings and numbers always felst (slightly) dirty for some reason.

I have a button and a sprite with two movements. The attack movement and the idle movement. The sprite is always being animated with the idle movement. When I click the button, I want to change the animation to the attack one and when finishing the attack, return to the idle animation.
Also, is possible to get the exact moment of the end of the attack to trigger another event?

I have a button and a sprite with two movements. The attack movement and the idle movement. The sprite is always being animated with the idle movement. When I click the button, I want to change the animation to the attack one and when finishing the attack, return to the idle animation.
Also, is possible to get the exact moment of the end of the attack to trigger another event?

onLoop is an optional parameter which can be a function or a string representing one of the animation methods. It does nothing by default. If specified, it will be called every time an animation "loops". It will have two parameters: the animation instance, and how many loops have been elapsed. The most usual value (apart from none) is the string 'pauseAtEnd'. It will make the animation loop once and then pause and stop on the last frame.

Now, let's say I supply my own little function.
But I don't exactly understand, how am I supposed to access the two parameters you talked about in the quote?