I´m starting with Kinetic.js and I have my first app working perfectly, but I don´t find the way to stop sprites... for example, I have one sprite and I want to "play" that sprite just once, see the frames and in the last one, one simple stop(). How can I do that? (Stop after the last "frame" of the sprite).
Here´s my code (for that sprite):
var myImage = new Image();
myImage.onload = function() {
var mySprite = new Kinetic.Sprite({
x: 250,
y: 40,
width: 70,
height: 109,
image: myImage,
animation: 'idle',
animations: animations,
frameRate: 5
});
layer1.add(mySprite);
mySprite.start();
};
myImage.src = 'sheet2.png';
Thanks in advance!