  Anisotropic flow can offer significant information of evolution dynamics in
heavy-ion collisions. A systematic study of the directed flow $v_1$ and
elliptic flow $v_2$ of hard photons and free nucleons is performed for
$^{40}$Ca+$^{40}$Ca collisions in a framework of isospin dependent quantum
molecular dynamics (IQMD) model. The study firstly reveals that thermal photons
emitted in intermediate-energy heavy-ion collisions have the behaviors of
directed and elliptic flows. The interesting phenomena of incident energy
dependence of $v_1$ and $v_2$ for thermal photons in central collisions also
confirmed that it can be regarded as a good probe of evolution dynamics.
Moreover, the multiplicities of hard photons and free nucleons and their
correlation are also investigated. We find that direct photon emission is
positively related to free nucleons emission, however, there exists an
anti-correlation for thermal photons with free nucleons.
