getNextFrameNo = function() {
            var delta = forward ? 1 : -1;
            return (i + delta + frames.length) % frames.length;
        }
Gets the index of the frame "up next".
@returns {number}