switchonthefly
verbUK /ˌswɪtʃ ɒn ðə ˈflaɪ/
US /ˌswɪtʃ ɑːn ðə ˈflaɪ/
To change something quickly while you are doing it.
The gamer can switchonthefly between two characters during a battle.
OTHER MEANINGS
2. To change plans suddenly without stopping what you are doing.
She had to switchonthefly when the bus was late.
3. To move between two settings or modes instantly.
The lamp can switchonthefly from bright to dim.
4. To solve a problem in a new way right as it happens.
The team switchedonthefly and won the game.