@Yehuda, the GifImage class does not keep track of where you pause the animation and (re)starting the animation will always start at the first image regardless of where it was stopped at.
@Yehuda, the GifImage class does not keep track of where you pause the animation and (re)starting the animation will always start at the first image regardless of where it was stopped at.
That's not true by me. All the pause() and resume() methods do is changes a variable (running variable 'pause') and changes the amount of running time ('time'). Since it uses System.currentTimeMillis() it doesn't know whether the execution was running or not, so if you pause the execution, then resume it after waiting a few seconds the animation won't start from the beginning or from where it left off, it goes by the elapsed time from initialization. So adding in the methods that I suggested is the way to make the animation continue from where it left off after resuming the paused execution.
(re)starting the animation will always start at the first image regardless of where it was stopped at.
After taking a closer look at the 'getCurrentImage' method, I realized that this was inaccurate. The process used to determine the current image is far different from what I imagined it would be. I am not particular impressed by the way it is coded; but, it gets the job done.
After taking a closer look at the 'getCurrentImage' method, I realized that this was inaccurate. The process used to determine the current image is far different from what I imagined it would be. I am not particular impressed by the way it is coded; but, it gets the job done.
I was wondering if you've looked at the GifImage class code, so I guess this is over.