The effect of an equilibrium flow on resonant absorption of linear Alfv\'en waves in coronal loops is studied in compressible viscous MHD. The study is carried out with a finite element code which solves the equations of viscous MHD in the whole volume of the equilibrium model. Computations of resonant absorption of Alfv\'en waves are carried out for two classes of models of coronal loops. We find that the efficiency of the resonant absorption process strongly depends on both the equilibrium parameters and the characteristics of the resonant wave. We show that an equilibrium shear flow can significantly influence the resonant absorption of Alfv\'en waves in coronal magnetic flux tubes. The presence of an equilibrium flow may therefore be important for resonant absorption of Alfv\'en waves. A parametric analysis also shows that the resonant absorption can be strongly enhanced, even up to total absorption of the incoming wave.