Search code examples
javascripthtmllimejs

limeJS looped animation doesn't display


I have a looped animation in LimeJS :

var scrollAnim = new lime.animation.MoveTo(800,248).setEasing(lime.animation.Easing.LINEAR);
var loopedAnim = lime.animation.Loop(scrollAnim);

roadSprite.runAction(loopedAnim);

However, when I use this code, nothing gets displayed on screen.

If I use the animation on its own:

var scrollAnim = new lime.animation.MoveTo(800,248).setEasing(lime.animation.Easing.LINEAR);
//var loopedAnim = lime.animation.Loop(scrollAnim);

roadSprite.runAction(scrollAnim);

It works fine. What am I doing wrong here?


Solution

  • arrrgh.... I feel silly.... I forgot to add

    goog.require('lime.animation.Loop');
    

    To the top of my js file.