Q:

Create js sprite freezing on first frame

Pulling my hair out with this one, hope its not something silly. Below is a snippet of code from a program. When leftwalker.x == 150 he should gotoAndPlay the standstill animation but it only plays the first frame, the previous animation runs fine. Any ideas? 
var data = 
         {
         images: ["images/ste_basic_wand.png"],
         frames: {width:64, height:64},
         animations: 
            {
                // start, end, next, speed
                walkright: [143,151,"walkright",1.18],
                walkleft: [118,125,"walkleft",1.18],
                stand:[39,45,"stand",0.08],
                standstill:[26,27, "standstill", 1.2]
            }

         };
         var spriteSheet = new createjs.SpriteSheet(data);

         leftwalker = new createjs.Sprite(spriteSheet);
         leftwalker.name = "lefty";
         leftwalker.framerate = 30;
         leftwalker.x = 100;
         leftwalker.y = 100;
         leftwalker.currentFrame = 0;
         leftwalker.scaleY = leftwalker.scaleX = 2;

         leftwalker.gotoAndPlay("walkright");

         stage.addChild(leftwalker);
         createjs.Ticker.setFPS(10);    
         createjs.Ticker.addEventListener("tick", tick);    
    }

    function tick(event) {
        if(container.x < 150)
        {   
        container.x += 5;
        }
        if(leftwalker.x < 150)
        {
            leftwalker.x += 2;
        }
        if(leftwalker.x == 150)
        {
            leftwalker.gotoAndPlay("standstill");
        }
        //  if (circle.x > stage.canvas.width) { circle.x = 0; }
        stage.update(event); // important!!
    }

A:

The reason this happens is because you are calling gotoAndPlay("standstill") during the tick. Once you reach 150, your sprite stops moving, so it is perpetually at x=150. This means each tick will tell it to gotoAndPlay the same frame, resulting it in being "stuck".

