Protein present in or involved in the biogenesis or function of the flagellum, a long whip-like or feathery structure which propels the cell through a liquid medium. This motile cilium is produced by the unicellular eukaryotes, and by the motile male gametes of many eukaryotic organisms. The flagella commonly have a characteristic axial '9+2' microtubular array (axoneme) and bends are generated along the length of the flagellum by restricted sliding of the nine outer doublets.