Animation updates

Added capability to set speed as either frame lenght or FPS.
Fixed a bug which caused the current frame to go out of range if frame
length was very small.