The regularity of the dynamics in different phases of protein folding is investigated for a set of proteins which undergo a cooperative, two-state folding transition. To determine the degree of regularity of the dynamics, the fractal dimension of probability fluxes is calculated on the basis of simulated folding trajectories. It has been found that the phases of regular and irregular dynamics alternate as follows. In the initial (collapse) phase of folding, the dynamics are essentially regular. Then, as the protein comes to the basin of semicompact states that precedes the transition state, the dynamics become irregular. At the transition state, the dynamics are regularized again but become less regular when the nativelike states are explored. Depending on the specific conditions at which the protein folding was considered, some phases of the dynamics could not be well resolved, but no significant deviation from this general picture has been observed. The regularization of the dynamics at the transition state is discussed in relation to the recent studies of the Hamiltonian dynamics of small clusters, where both regular and chaotic dynamics were observed depending on the flatness of the energy surface at the transition state.