You need to have beaten Maylene (the fourth gym leader who is in Veilstone) to be able to use fly.
Chat with our AI personalities
You need the Thunder Badge.
You can use the GTS in Pokemon Platinum after you get the first gym badge from the Oreburgh City gym.
To use the HM Fly, you have to have the Thunder Badge, won from Lt. Surge in Vermilion City.
You will need the 7th badge to use the move Rock Smash.
It's badge 7