On the scalar field dynamics in a spatially flat Friedman universe