             @_dis.context.restore()
     _update: ->
         if @_dis.visible
-            if @_dis.timer.getElapsedTime() >= (1000 / @_dis.frameRate)
-                if @_dis.current.frame < @_dis.current.stop
-                    @_dis.current.frame += 1
+            if @_ani.timer.getElapsedTime() >= (1000 / @_ani.frameRate)
+                if @_ani.current.frame < @_ani.current.stop
+                    @_ani.current.frame += 1
                 else
-                    @_dis.current.frame = @_dis.current.start
-                @_dis.timer.restart()
+                    @_ani.current.frame = @_ani.current.start
+                @_ani.timer.restart()
             super()
 #end class AniSprite

        if what is 'cellWidth' or
        what is 'cellHeight' or
        what is 'frameRate'
            @_dis[what] = to
        else if what is 'current' or
            what is 'animation' or
            what is 'cycle'
                if to isnt @_dis.current.name
                    @_dis.current.frame = 1
                    for cycle in @_dis.cycles when cycle.name is to
                        @_dis.current = cycle
                        return
        else if what.match /^cycle/
            @_dis.cycles ?= new Array()
            @_dis.timer ?= new Timer(true)
            
            i = 0
            to.index ?= i += 1
            to.start ?= 1
            to.stop ?= to.start + env.ANICYCLE_DEFAULT_CONFIG.numFrames - 1
            to.name ?= if what.slice(5) then what.slice(5) else env.ANICYCLE_DEFAULT_CONFIG.name
            @_dis.cycles.push(new AniCycle(to))
            @_dis.current ?= to
        else
            super what, to
        this
    
    #animation control
    play: ->
        @_dis.timer.start()
        this
    pause: ->
        @_dis.timer.pause()
        this
    stop: ->
        @_dis.timer.stop()
        @_dis.current.frame = 1
        this
    
    #update routines

    get: (what) ->
        switch what
            when 'cellWidth', 'cellHeight', 'frameRate'
                @_ani[what]
            when 'current', 'animation', 'cycle'
                @_ani.current.name
            else
                super what
    
