The latest results on the nuclear modification factor ($R_{\rm AA}$) and the elliptic flow ($v_{2}$) of D mesons and heavy-flavour hadron decay leptons in Pb--Pb collisions at $\sqrt{s_{\rm NN}}=5.02$ and $2.76$ TeV measured with ALICE are presented for different centrality classes. The results, obtained in a wide transverse momentum ($p_{\rm T}$) range and in different rapidity regions, provide further information on the properties of the medium.
A suppression of a factor of about $3$--$4$ of production yields relative to pp collisions and a positive $v_{2}$ for open heavy-flavour particles are observed in $p_{\rm T}>5$ GeV/$c$ in most central collisions and in intermediate $p_{\rm T}$ region in semi-central collisions, respectively. The leptons at high $p_{\rm T}$ are dominated by beauty-hadron decays, therefore they are sensitive to transport properties of beauty quarks in the QCD medium.
Finally, the results obtained with the Event-Shape Engineering (ESE) technique applied to the D-meson elliptic flow in semi-central Pb--Pb collisions will be discussed.