getSequence fixed

Added loop parameter to getSequence, if true, adds an extra frame equals
to the first frame.
So when used with animationLoop(true), last frame will be showed.