Added getFrameNumber to access current frame count