Dynamics and thermodynamics of phase transistions in hot nuclei