The HM Flash can be obtained by speaking with Prof Oak’s Aid who can be found in a building with a grey roof on Route 2. Make sure you currently have caught at least 10 different species of Pokémon.
Note: To check if condition is met, press ‘P’ to open Pokédex and look under the heading ‘Pokédex data’ at the top left. It will show the number of Pokémon you have seen and caught.
He will give you the HM Flash when you have met the above condition.