I am running a current animation on click. At the time of click, I start loading the next animation. On next click event, I fire the next animation, and hide current one with the code below. It is essential that the animation fires without delay.
Â
$("#canvas").on("click touch touchstart",function(){
if (firstRun){
current.gotoAndPlay(0); //current is an animated sprite
loadNext();
console.log("first run");
firstRun=false;