Use Arrow Keys. Look Inside. This uses code and not animation frames.
@kriblo for a beautifully done simpler version .... me for learning by smoothing over the rough edges