changed animate to onEnterFrame