I have image with 10 different animations and 10 frames by each. On stage i have for example set of 15 diffeent objects with animation.
From time to time i have to change set of animation to another.One way to do this is to delete objects and create them once more with needed sprite animation.
var moveClip1 = createClip(5);
createClip: function (symbolIndex) {
var image = this.game.getImage('images.symbols');
var base = new PIXI.BaseTexture(image);
var textures = [];
for (j = 0; j < steps; j++)
tempTexture = new PIXI.Texture(base, {
x: this.game.symbolHeight * j,
y: this.game.symbolWidth * symbolIndex,
width: this.game.symbolHeight,
height: this.game.symbolWidth
});
textures.push(tempTexture);
symbolClip= new PIXI.extras.AnimatedSprite(textures);
}
return (symbolClip)
}
Is it posible to change texture in existing object moveClip1 without recrete the object?