       firstFrame = I.activeAnimation.frames.first()
       firstSprite = I.spriteLookup[firstFrame]
 
-      I.currentFrameIndex = firstFrame
+      I.currentFrameIndex = 0
+      I.sprite = firstSprite
       I.width = firstSprite.width
       I.height = firstSprite.height 
     else

  advanceFrame = ->
    frames = I.activeAnimation.frames

    if I.currentFrameIndex == frames.last() 
      self.trigger("Complete") 

      nextState = I.activeAnimation.complete

      if nextState
        I.activeAnimation = find(nextState) || I.activeAnimation
        sprite = I.spriteLookup[I.activeAnimation.frames.first()]

        I.width = sprite.width
        I.height = sprite.height

    I.currentFrameIndex = I.activeAnimation.frames[(frames.indexOf(I.currentFrameIndex) + 1) % frames.length]
    I.sprite = I.spriteLookup[I.currentFrameIndex]

  find = (name) ->
    result = null


        if updateFrame = (time - I.lastUpdate) >= I.activeAnimation.speed
          I.lastUpdate = time
          if triggers = I.activeAnimation.triggers?[I.currentFrameIndex]
            triggers.each (event) ->
              self.trigger(event)

          advanceFrame()
      else
        if triggers = I.activeAnimation.triggers?[I.currentFrameIndex]
          triggers.each (event) ->
            self.trigger(event)

